Follow up: Fixes issue #1664 - Missing support for groupOfUniqueNames / uniquemember in LDAP sync.

This commit is contained in:
Thorsten Eckel 2018-01-09 14:58:33 +01:00
parent 26800ad02f
commit a8e11c50f3

View file

@ -136,8 +136,11 @@ class Ldap
def group_user_dns(entry) def group_user_dns(entry)
return entry[:member] if entry[:member].present? return entry[:member] if entry[:member].present?
return if entry[:memberuid].blank? return group_user_dns_memberuid(entry) if entry[:memberuid].present?
return entry[:uniquemember] if entry[:uniquemember].present?
end
def group_user_dns_memberuid(entry)
entry[:memberuid].collect do |uid| entry[:memberuid].collect do |uid|
dn = nil dn = nil
@ldap.search("(uid=#{uid})", attributes: %w[dn]) do |user| @ldap.search("(uid=#{uid})", attributes: %w[dn]) do |user|