Commit 7bf92b36 authored by Marin Jankovski's avatar Marin Jankovski

Ldap check recognize ldap user filter.

parent 78a7a9b0
...@@ -677,7 +677,20 @@ namespace :gitlab do ...@@ -677,7 +677,20 @@ namespace :gitlab do
end end
def filter 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 end
def ldap 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