diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-09-20 05:52:39 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-09-20 05:52:39 +0000 |
commit | 8fd768c2cc22cdfb54266a5ca9f3cf11550908c9 (patch) | |
tree | fa97b517a976cfa01164616bd28ac54ee7572089 | |
parent | 4722c45ea2e3a8503ab057f771ec7367215963a6 (diff) | |
parent | 08714d2bcd6ccf18c202504ea03a8c81c193adc6 (diff) | |
download | gitlab-ce-8fd768c2cc22cdfb54266a5ca9f3cf11550908c9.tar.gz |
Merge branch 'ldap_user_attr_method' into 'master'
Move LDAP user attributes to a method
## What does this MR do?
This is a change that supports an EE fix. This small change needs to be made in CE to prevent future merge conflicts.
See https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/736 for the EE changes.
See merge request !6377
-rw-r--r-- | lib/gitlab/ldap/adapter.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/ldap/adapter.rb b/lib/gitlab/ldap/adapter.rb index 9100719da87..82cb8cef754 100644 --- a/lib/gitlab/ldap/adapter.rb +++ b/lib/gitlab/ldap/adapter.rb @@ -70,7 +70,7 @@ module Gitlab private def user_options(field, value, limit) - options = { attributes: %W(#{config.uid} cn mail dn) } + options = { attributes: user_attributes } options[:size] = limit if limit if field.to_sym == :dn @@ -98,6 +98,10 @@ module Gitlab filter end end + + def user_attributes + %W(#{config.uid} cn mail dn) + end end end end |