Either one of type, filter, subtree, targetgroup, attrs or memberof is
required.

https://fedorahosted.org/freeipa/ticket/819

Jan
From 2612a4a2d6cb01a78ee160edbe0b24c757457937 Mon Sep 17 00:00:00 2001
From: Jan Zeleny <jzel...@redhat.com>
Date: Fri, 21 Jan 2011 13:38:30 -0500
Subject: [PATCH] Make ipa permission-add ask for optional attributes

Either one of type, filter, subtree, targetgroup, attrs or memberof is
required.

https://fedorahosted.org/freeipa/ticket/819
---
 ipalib/plugins/permission.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/ipalib/plugins/permission.py b/ipalib/plugins/permission.py
index 43bb2634d34cab8d2bb8ecbce883df8008c34645..f4faa6115bf9d0609b611e6fd502a1b9b23b0bff 100644
--- a/ipalib/plugins/permission.py
+++ b/ipalib/plugins/permission.py
@@ -116,32 +116,38 @@ class permission(LDAPObject):
             label=_('Attributes'),
             doc=_('Comma-separated list of attributes'),
             normalizer=lambda value: value.lower(),
+            alwaysask=True,
         ),
         StrEnum('type?',
             cli_name='type',
             label=_('Type'),
             doc=_('Type of IPA object (user, group, host, hostgroup, service, netgroup, dns)'),
             values=(u'user', u'group', u'host', u'service', u'hostgroup', u'netgroup', u'dns',),
+            alwaysask=True,
         ),
         Str('memberof?',
             cli_name='memberof',
             label=_('Member of group'),  # FIXME: Does this label make sense?
             doc=_('Target members of a group'),
+            alwaysask=True,
         ),
         Str('filter?',
             cli_name='filter',
             label=_('Filter'),
             doc=_('Legal LDAP filter (e.g. ou=Engineering)'),
+            alwaysask=True,
         ),
         Str('subtree?',
             cli_name='subtree',
             label=_('Subtree'),
             doc=_('Subtree to apply permissions to'),
+            alwaysask=True,
         ),
         Str('targetgroup?',
             cli_name='targetgroup',
             label=_('Target group'),
             doc=_('User group to apply permissions to'),
+            alwaysask=True,
         ),
     )
 
-- 
1.7.3.4

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to