Enable filtering search results by member attributes.

LDAPSearch base class has now the ability to generate additional
options for objects with member attributes. These options are
used to filter search results - search only for objects without
the specified members.

Example:
ipa group-find --no-users=admin

Only direct members are taken into account.

Ticket #288
This commit is contained in:
Pavel Zuna
2010-12-02 19:24:11 -05:00
committed by Adam Young
parent ffc6031ad7
commit 3a9210f06f
4 changed files with 37 additions and 2 deletions

View File

@@ -212,6 +212,8 @@ class group_find(LDAPSearch):
"""
Search for groups.
"""
member_attributes = ['member']
msg_summary = ngettext(
'%(count)d group matched', '%(count)d groups matched', 0
)