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 # Apply LDAP user filter if present
if config.user_filter.present? if config.user_filter.present?
Net::LDAP::Filter.join( filter = Net::LDAP::Filter.join(
filter, filter,
Net::LDAP::Filter.construct(config.user_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