summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/permission.py
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2011-11-21 10:50:27 -0500
committerMartin Kosek <mkosek@redhat.com>2011-11-30 17:08:35 +0100
commit135ccf89de866ea2cdda96993ed2743394e1e716 (patch)
tree1b3c7bef4d5653255b75014218d1d0be9b10d5bb /ipalib/plugins/permission.py
parent2ac9d4816a85822825257e16f4fcf74e15a8ea02 (diff)
downloadfreeipa-135ccf89de866ea2cdda96993ed2743394e1e716.tar.gz
freeipa-135ccf89de866ea2cdda96993ed2743394e1e716.tar.xz
freeipa-135ccf89de866ea2cdda96993ed2743394e1e716.zip
Parse comma-separated lists of values in all parameter types. This can be enabled for a specific parameter by setting the "csv" option to True.
Remove "List" parameter type and replace all occurences of it with appropriate multi-valued parameter ("Str" in most cases) with csv enabled. Add new parameter type "Any", capable of holding values of any type. This is needed by the "batch" command, as "Str" is not suitable type for the "methods" parameter. ticket 2007
Diffstat (limited to 'ipalib/plugins/permission.py')
-rw-r--r--ipalib/plugins/permission.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/ipalib/plugins/permission.py b/ipalib/plugins/permission.py
index e51e3b859..c48979f9d 100644
--- a/ipalib/plugins/permission.py
+++ b/ipalib/plugins/permission.py
@@ -114,16 +114,18 @@ class permission(LDAPObject):
label=_('Permission name'),
primary_key=True,
),
- List('permissions',
+ Str('permissions+',
cli_name='permissions',
label=_('Permissions'),
doc=_('Comma-separated list of permissions to grant ' \
'(read, write, add, delete, all)'),
+ csv=True,
),
- List('attrs?',
+ Str('attrs*',
cli_name='attrs',
label=_('Attributes'),
doc=_('Comma-separated list of attributes'),
+ csv=True,
normalizer=lambda value: value.lower(),
flags=('ask_create', 'ask_update'),
),