diff options
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/ldap/config.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/ldap/user.rb | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/lib/gitlab/ldap/config.rb b/lib/gitlab/ldap/config.rb index d2ffa2e1fe8..101a3285f4b 100644 --- a/lib/gitlab/ldap/config.rb +++ b/lib/gitlab/ldap/config.rb @@ -84,6 +84,10 @@ module Gitlab options['block_auto_created_users'] end + def attributes + options['attributes'] + end + protected def base_config Gitlab.config.ldap diff --git a/lib/gitlab/ldap/user.rb b/lib/gitlab/ldap/user.rb index e568b0e3b31..e5023f5da11 100644 --- a/lib/gitlab/ldap/user.rb +++ b/lib/gitlab/ldap/user.rb @@ -68,12 +68,13 @@ module Gitlab Gitlab::LDAP::Access.allowed?(gl_user) end - def ldap_config - Gitlab::LDAP::Config.new(auth_hash.provider) + def ldap_config(provider = auth_hash.provider) + Gitlab::LDAP::Config.new(provider) end def auth_hash=(auth_hash) - @auth_hash = Gitlab::LDAP::AuthHash.new(auth_hash, ldap_config) + config = ldap_config(auth_hash.provider) + @auth_hash = Gitlab::LDAP::AuthHash.new(auth_hash, config) end end end |