Make sure the filters are applied

parent b229b0f0
...@@ -48,15 +48,16 @@ module Gitlab ...@@ -48,15 +48,16 @@ module Gitlab
end end
def user_filter(login) def user_filter(login)
Net::LDAP::Filter.eq(config.uid, login).tap do |filter| filter = Net::LDAP::Filter.eq(config.uid, login)
# Apply LDAP user filter if present
if config.user_filter.present? # Apply LDAP user filter if present
Net::LDAP::Filter.join( if config.user_filter.present?
filter, filter = Net::LDAP::Filter.join(
Net::LDAP::Filter.construct(config.user_filter) filter,
) Net::LDAP::Filter.construct(config.user_filter)
end )
end end
filter
end end
def user def user
......
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