summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2015-04-13 11:04:31 +0200
committerJacob Vosmaer <contact@jacobvosmaer.nl>2015-04-13 11:04:31 +0200
commit325b66365bc0bac4c17398dca397cfa30637de24 (patch)
tree1f8da445be4bcc89e1df99de739778c084b9fea3
parent896ea2482bd78f3683140bb8aa08f0583a58361e (diff)
downloadgitlab-ce-325b66365bc0bac4c17398dca397cfa30637de24.tar.gz
Remove special cases for the 'ldap' provider
-rw-r--r--lib/gitlab/ldap/config.rb2
-rw-r--r--lib/gitlab/ldap/user.rb2
2 files changed, 1 insertions, 3 deletions
diff --git a/lib/gitlab/ldap/config.rb b/lib/gitlab/ldap/config.rb
index 0cb24d0ccc1..fa5b6c1e230 100644
--- a/lib/gitlab/ldap/config.rb
+++ b/lib/gitlab/ldap/config.rb
@@ -27,8 +27,6 @@ module Gitlab
def initialize(provider)
if self.class.valid_provider?(provider)
@provider = provider
- elsif provider == 'ldap'
- @provider = self.class.providers.first
else
self.class.invalid_provider(provider)
end
diff --git a/lib/gitlab/ldap/user.rb b/lib/gitlab/ldap/user.rb
index b04f5b4ac37..75026aeaeb2 100644
--- a/lib/gitlab/ldap/user.rb
+++ b/lib/gitlab/ldap/user.rb
@@ -13,7 +13,7 @@ module Gitlab
def find_by_uid_and_provider(uid, provider)
# LDAP distinguished name is case-insensitive
identity = ::Identity.
- where(provider: [provider, :ldap]).
+ where(provider: provider).
where('lower(extern_uid) = ?', uid.downcase).last
identity && identity.user
end