Move method to match with CE

parent 103419be
...@@ -49,6 +49,10 @@ module Gitlab ...@@ -49,6 +49,10 @@ module Gitlab
@adapter ||= Gitlab::LDAP::Adapter.new(provider) @adapter ||= Gitlab::LDAP::Adapter.new(provider)
end end
def ldap_config
Gitlab::LDAP::Config.new(provider)
end
def ldap_user def ldap_user
@ldap_user ||= Gitlab::LDAP::Person.find_by_dn(user.extern_uid, adapter) @ldap_user ||= Gitlab::LDAP::Person.find_by_dn(user.extern_uid, adapter)
end end
...@@ -145,10 +149,6 @@ module Gitlab ...@@ -145,10 +149,6 @@ module Gitlab
end.map(&:cn) end.map(&:cn)
end end
def ldap_config
Gitlab::LDAP::Config.new(provider)
end
def sync_ssh_keys? def sync_ssh_keys?
ldap_config.sync_ssh_keys? ldap_config.sync_ssh_keys?
end 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