Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-09-20 08:52:39 +0300
committerDouwe Maan <douwe@gitlab.com>2016-09-20 08:52:39 +0300
commit8fd768c2cc22cdfb54266a5ca9f3cf11550908c9 (patch)
treefa97b517a976cfa01164616bd28ac54ee7572089
parent4722c45ea2e3a8503ab057f771ec7367215963a6 (diff)
parent08714d2bcd6ccf18c202504ea03a8c81c193adc6 (diff)
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.rb6
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