Commit 8fd768c2 authored by Douwe Maan's avatar Douwe Maan

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
parents 4722c45e 08714d2b
...@@ -70,7 +70,7 @@ module Gitlab ...@@ -70,7 +70,7 @@ module Gitlab
private private
def user_options(field, value, limit) def user_options(field, value, limit)
options = { attributes: %W(#{config.uid} cn mail dn) } options = { attributes: user_attributes }
options[:size] = limit if limit options[:size] = limit if limit
if field.to_sym == :dn if field.to_sym == :dn
...@@ -98,6 +98,10 @@ module Gitlab ...@@ -98,6 +98,10 @@ module Gitlab
filter filter
end end
end end
def user_attributes
%W(#{config.uid} cn mail dn)
end
end end
end end
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