Browse Source

Only use OTRS auth backend if endpoint exists.

Martin Edenhofer 12 years ago
parent
commit
11ff582c6d
1 changed files with 3 additions and 0 deletions
  1. 3 0
      lib/auth/otrs.rb

+ 3 - 0
lib/auth/otrs.rb

@@ -1,6 +1,9 @@
 class Auth::OTRS
   def self.check( user, username, password, config )
 
+    endpoint = Setting.get('import_otrs_endpoint')
+    return false if !endpoint || endpoint.empty?
+
     # connect to OTRS
     result = Import::OTRS.auth( username, password )
     return false if !result