This commit is contained in:
Jr Aquino 2011-02-17 09:54:26 -08:00 committed by Rob Crittenden
parent bc8d33307a
commit 478186e485

View File

@ -197,11 +197,13 @@ class netgroup_find(LDAPSearch):
# Do not display private mepManagedEntry netgroups by default # Do not display private mepManagedEntry netgroups by default
# If looking for private groups, we need to omit the negation search filter # If looking for private groups, we need to omit the negation search filter
search_kw = {}
search_kw['objectclass'] = ['mepManagedEntry']
if not options['private']: if not options['private']:
search_kw = self.args_options_2_entry(**options) local_filter = ldap.make_filter(search_kw, rules=ldap.MATCH_NONE)
search_kw['objectclass'] = ['mepManagedEntry'] else:
negation = ldap.make_filter(search_kw, rules=ldap.MATCH_NONE) local_filter = ldap.make_filter(search_kw, rules=ldap.MATCH_ALL)
filter = ldap.combine_filters((negation, filter), rules='&') filter = ldap.combine_filters((local_filter, filter), rules=ldap.MATCH_ALL)
return (filter, base_dn, scope) return (filter, base_dn, scope)
api.register(netgroup_find) api.register(netgroup_find)