Add check for member attributes that just contain a uid for the LDAP group synchronization

- the member attribute of groups provided by our company LDAP contains only a the members
  userid prefixed by 'uid=' an not the full dn of the user
  --> the member attribute has to be checked also for this value
This commit is contained in:
Robin Müller
2015-05-27 16:30:11 +02:00
parent 9bfc23c3f1
commit 37499d877a
+2
View File
@@ -42,6 +42,8 @@ module Gitlab
member_uids.any? { |member_uid| member_uid.downcase == user_uid }
elsif member_dns.any? { |member_dn| member_dn.downcase == user_dn }
true
elsif member_dns.any? { |member_dn| member_dn.downcase == "uid=" + user_uid }
true
elsif adapter.config.active_directory
adapter.dn_matches_filter?(user.dn, active_directory_recursive_memberof_filter)
end