Commit 5d966ccd authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'ldap_check' into 'master'

gitlab:ldap:check uses LDAP user filter
parents 23e2ec6b 7bf92b36
......@@ -677,7 +677,20 @@ namespace :gitlab do
end
def filter
Net::LDAP::Filter.present?(ldap_config.uid)
uid_filter = Net::LDAP::Filter.present?(ldap_config.uid)
if user_filter
Net::LDAP::Filter.join(uid_filter, user_filter)
else
uid_filter
end
end
def user_filter
if ldap_config['user_filter'] && ldap_config.user_filter.present?
Net::LDAP::Filter.construct(ldap_config.user_filter)
else
nil
end
end
def ldap
......
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