BigW Consortium Gitlab

Commit 325b6636 by Jacob Vosmaer

Remove special cases for the 'ldap' provider

parent 896ea248
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment