Removed not longer needed sso backend.

This commit is contained in:
Martin Edenhofer 2016-01-15 15:10:56 +01:00
parent 29b41125d2
commit 7ae3fbbc11
2 changed files with 0 additions and 43 deletions

View file

@ -22,20 +22,6 @@ returns
{
adapter: 'Sso::Env',
},
{
adapter: 'Sso::Otrs',
required_group_ro: 'stats',
group_rw_role_map: {
'admin' => 'Admin',
'stats' => 'Report',
},
group_ro_role_map: {
'stats' => 'Report',
},
always_role: {
'Agent' => true,
},
},
]
# added configured backends

View file

@ -1,29 +0,0 @@
# Copyright (C) 2012-2013 Zammad Foundation, http://zammad-foundation.org/
module Sso::Otrs
def self.check( params, _config_item )
endpoint = Setting.get('import_otrs_endpoint')
return false if !endpoint
return false if endpoint.empty?
return false if endpoint == 'http://otrs_host/otrs'
return false if !params['SessionID']
# connect to OTRS
result = Import::OTRS.session( params['SessionID'] )
return false if !result
return false if !result['groups_ro']
return false if !result['groups_rw']
return false if !result['user']
user = User.where( login: result['user']['UserLogin'], active: true ).first
if !user
Rails.logger.info "No such user #{result['user']['UserLogin']}, requested for SSO!"
return
end
user
end
end