diff options
author | Jan Cholasta <jcholast@redhat.com> | 2011-06-28 16:06:11 +0200 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2011-06-28 01:57:11 -0400 |
commit | 67b807d6402942061d9762f2c1ff31779b7d4744 (patch) | |
tree | 0663d60cacc6abb1df74805450064dcc2dc64b29 /ipalib/plugins/netgroup.py | |
parent | f05141e6468ce972b9c0d9707a4d640fe40da2b7 (diff) | |
download | freeipa-67b807d6402942061d9762f2c1ff31779b7d4744.tar.gz freeipa-67b807d6402942061d9762f2c1ff31779b7d4744.tar.xz freeipa-67b807d6402942061d9762f2c1ff31779b7d4744.zip |
Replace the 'private' option in netgroup-find with 'managed'.
The 'private' option is kept in to maintain API compatibility, but
is hidden from the user.
ticket 1120
Diffstat (limited to 'ipalib/plugins/netgroup.py')
-rw-r--r-- | ipalib/plugins/netgroup.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/ipalib/plugins/netgroup.py b/ipalib/plugins/netgroup.py index 56e026ed2..e611ea299 100644 --- a/ipalib/plugins/netgroup.py +++ b/ipalib/plugins/netgroup.py @@ -189,18 +189,23 @@ class netgroup_find(LDAPSearch): takes_options = LDAPSearch.takes_options + ( Flag('private', - cli_name='private', - doc=_('search for private groups'), + exclude='webui', + flags=['no_option', 'no_output'], + ), + Flag('managed', + cli_name='managed', + doc=_('search for managed groups'), + default_from=lambda private: private, ), ) def pre_callback(self, ldap, filter, attrs_list, base_dn, scope, *args, **options): # Do not display private mepManagedEntry netgroups by default - # If looking for private groups, we need to omit the negation search filter + # If looking for managed groups, we need to omit the negation search filter search_kw = {} search_kw['objectclass'] = ['mepManagedEntry'] - if not options['private']: + if not options['managed']: local_filter = ldap.make_filter(search_kw, rules=ldap.MATCH_NONE) else: local_filter = ldap.make_filter(search_kw, rules=ldap.MATCH_ALL) |