diff options
author | Jan-Willem van der Meer <mail@jewilmeer.nl> | 2014-10-14 09:40:35 +0200 |
---|---|---|
committer | Jan-Willem van der Meer <mail@jewilmeer.nl> | 2014-10-14 09:40:35 +0200 |
commit | b229b0f00327b210374d847b57760757fdcd8ee3 (patch) | |
tree | f3ee581b81e080c891cea99118ed615783e35c62 | |
parent | 23b692c701f0d310d6069fc74656f2bfdfdfc360 (diff) | |
download | gitlab-ce-b229b0f00327b210374d847b57760757fdcd8ee3.tar.gz |
Fix authorization for LDAP login
-rw-r--r-- | lib/gitlab/ldap/access.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/ldap/user.rb | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/ldap/access.rb b/lib/gitlab/ldap/access.rb index 111c750226f..eb2c4e48ff2 100644 --- a/lib/gitlab/ldap/access.rb +++ b/lib/gitlab/ldap/access.rb @@ -45,6 +45,10 @@ module Gitlab def adapter @adapter ||= Gitlab::LDAP::Adapter.new(provider) end + + def ldap_config + Gitlab::LDAP::Config.new(provider) + end end end end diff --git a/lib/gitlab/ldap/user.rb b/lib/gitlab/ldap/user.rb index 9235f6310df..3176e9790a7 100644 --- a/lib/gitlab/ldap/user.rb +++ b/lib/gitlab/ldap/user.rb @@ -30,7 +30,7 @@ module Gitlab def find_by_uid_and_provider self.class.find_by_uid_and_provider( - auth_hash.provider, auth_hash.uid.downcase) + auth_hash.uid.downcase, auth_hash.provider) end def find_by_email |