diff options
author | Drew Blessing <drew@gitlab.com> | 2016-09-15 22:46:22 -0500 |
---|---|---|
committer | Drew Blessing <drew@gitlab.com> | 2016-09-15 22:46:22 -0500 |
commit | 08714d2bcd6ccf18c202504ea03a8c81c193adc6 (patch) | |
tree | 9175219515f0681e04074cd87ebb79c84f1a0983 /lib | |
parent | 1038ef54d0405ae08eb3f413f936197f0775987b (diff) | |
download | gitlab-ce-08714d2bcd6ccf18c202504ea03a8c81c193adc6.tar.gz |
Move LDAP user attributes to a method
Diffstat (limited to 'lib')
-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 |