From c0e02c3d89ee4563b02ba9db3a5db14ce6bd681b Mon Sep 17 00:00:00 2001 From: Ryan Lue Date: Wed, 16 May 2018 22:36:26 +0800 Subject: [PATCH] Add LDAP user_filter to Ldap::Group#group_user_dns_memberuid search --- lib/ldap/group.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ldap/group.rb b/lib/ldap/group.rb index b3320a85c..2ce254d2a 100644 --- a/lib/ldap/group.rb +++ b/lib/ldap/group.rb @@ -143,7 +143,7 @@ class Ldap def group_user_dns_memberuid(entry) entry[:memberuid].collect do |uid| dn = nil - @ldap.search("(uid=#{uid})", attributes: %w[dn]) do |user| + @ldap.search("(&(uid=#{uid})#{Import::Ldap.config[:user_filter]})", attributes: %w[dn]) do |user| dn = user.dn end dn