summaryrefslogtreecommitdiffstats
path: root/ipaserver/plugins/permission.py
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2016-06-08 16:00:49 +0200
committerJan Cholasta <jcholast@redhat.com>2016-06-20 16:39:12 +0200
commitf554078291d682d59956998af97f7d3066fbe7e7 (patch)
tree536cda31a019bce7886dc4a9f64d23aa24e55f44 /ipaserver/plugins/permission.py
parentdb13494045198842a049d40a3481d9081c7ce175 (diff)
downloadfreeipa-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/permission.py')
-rw-r--r--ipaserver/plugins/permission.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/ipaserver/plugins/permission.py b/ipaserver/plugins/permission.py
index 9f19358da..971172766 100644
--- a/ipaserver/plugins/permission.py
+++ b/ipaserver/plugins/permission.py
@@ -165,6 +165,13 @@ def _disallow_colon(option):
)
+_ipapermissiontype_param = Str(
+ 'ipapermissiontype+',
+ label=_('Permission flags'),
+ flags={'no_create', 'no_update', 'no_search'},
+)
+
+
@register()
class permission(baseldap.LDAPObject):
"""
@@ -346,6 +353,8 @@ class permission(baseldap.LDAPObject):
doc=_('Deprecated; use %s' % new_name),
flags={'no_option', 'virtual_attribute'})
for old_name, new_name in _DEPRECATED_OPTION_ALIASES.items()
+ ) + (
+ _ipapermissiontype_param,
)
def reject_system(self, entry):
@@ -945,9 +954,7 @@ class permission_add_noaci(baseldap.LDAPCreate):
has_output_params = baseldap.LDAPCreate.has_output_params + output_params
takes_options = (
- Str('ipapermissiontype+',
- label=_('Permission flags'),
- ),
+ _ipapermissiontype_param,
)
def get_options(self):