Improved OTRS auth backend.
This commit is contained in:
parent
676cbe9734
commit
f4bb730aa9
1 changed files with 2 additions and 1 deletions
|
@ -1,10 +1,11 @@
|
|||
require 'import/otrs'
|
||||
module Auth
|
||||
end
|
||||
module Auth::OTRS
|
||||
def self.check( username, password, config, user )
|
||||
|
||||
endpoint = Setting.get('import_otrs_endpoint')
|
||||
return false if !endpoint || endpoint.empty?
|
||||
return false if !endpoint || endpoint.empty? || endpoint == 'http://otrs_host/otrs'
|
||||
|
||||
# connect to OTRS
|
||||
result = Import::OTRS.auth( username, password )
|
||||
|
|
Loading…
Reference in a new issue