Improve filtering of enrollments search results.

This is required for effective filtering of enrollments search
results in the webUI and also gives an edge to the CLI.

After this patch, each LDAPObject can define its relationships
to other LDAPObjects. For now, this is used only for filtering
search results by enrollments, but there are probably more
benefits to come.

You can do this for example:

# search for all users not enrolled in group admins
ipa user-find --not-in-groups=admins

# search for all groups not enrolled in group global with user Pavel
ipa group-find --users=Pavel --not-in-groups=global

# more examples:
ipa group-find --users=Pavel,Jakub --no-users=Honza
ipa hostgroup-find --hosts=webui.pzuna
This commit is contained in:
Pavel Zuna
2011-01-04 15:15:54 -05:00
committed by Adam Young
parent 4f2a6e0a25
commit d6d579ead4
6 changed files with 68 additions and 13 deletions

View File

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