From a8e11c50f367b5a6dd4820595a55f9d11d183764 Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Tue, 9 Jan 2018 14:58:33 +0100 Subject: [PATCH] Follow up: Fixes issue #1664 - Missing support for groupOfUniqueNames / uniquemember in LDAP sync. --- lib/ldap/group.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ldap/group.rb b/lib/ldap/group.rb index e92aa58ad..545ac9d29 100644 --- a/lib/ldap/group.rb +++ b/lib/ldap/group.rb @@ -136,8 +136,11 @@ class Ldap def group_user_dns(entry) 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| dn = nil @ldap.search("(uid=#{uid})", attributes: %w[dn]) do |user|