diff options
author | Jan Cholasta <jcholast@redhat.com> | 2016-06-08 16:00:49 +0200 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2016-06-20 16:39:12 +0200 |
commit | f554078291d682d59956998af97f7d3066fbe7e7 (patch) | |
tree | 536cda31a019bce7886dc4a9f64d23aa24e55f44 /ipaserver/plugins/group.py | |
parent | db13494045198842a049d40a3481d9081c7ce175 (diff) | |
download | freeipa-f554078291d682d59956998af97f7d3066fbe7e7.tar.gz freeipa-f554078291d682d59956998af97f7d3066fbe7e7.tar.xz freeipa-f554078291d682d59956998af97f7d3066fbe7e7.zip |
frontend: don't copy command arguments to output params
Use only object params and params defined in has_output_params as output
params. This removes unnecessary duplication of params defined both in
object plugins and as command arguments.
This requires all command output params to be properly defined in either
the object plugins or the command's has_output_params. Fix the plugins
where this wasn't true.
https://fedorahosted.org/freeipa/ticket/4739
Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'ipaserver/plugins/group.py')
-rw-r--r-- | ipaserver/plugins/group.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/ipaserver/plugins/group.py b/ipaserver/plugins/group.py index 2b0c08050..dcd4a91d8 100644 --- a/ipaserver/plugins/group.py +++ b/ipaserver/plugins/group.py @@ -139,6 +139,14 @@ register = Registry() PROTECTED_GROUPS = (u'admins', u'trust admins', u'default smb group') +ipaexternalmember_param = Str('ipaexternalmember*', + cli_name='external', + label=_('External member'), + doc=_('Members of a trusted domain in DOM\\name or name@domain form'), + flags=['no_create', 'no_update', 'no_search'], + ) + + @register() class group(LDAPObject): """ @@ -271,17 +279,10 @@ class group(LDAPObject): doc=_('GID (use this option to set it manually)'), minvalue=1, ), + ipaexternalmember_param, ) -ipaexternalmember_param = Str('ipaexternalmember*', - cli_name='external', - label=_('External member'), - doc=_('Members of a trusted domain in DOM\\name or name@domain form'), - flags=['no_create', 'no_update', 'no_search'], - ) - - @register() class group_add(LDAPCreate): __doc__ = _('Create a new group.') @@ -498,7 +499,7 @@ class group_find(LDAPSearch): @register() class group_show(LDAPRetrieve): __doc__ = _('Display information about a named group.') - has_output_params = LDAPRetrieve.has_output_params + (ipaexternalmember_param,) + def post_callback(self, ldap, dn, entry_attrs, *keys, **options): assert isinstance(dn, DN) if ('ipaexternalmember' in entry_attrs and |