summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/sudorule.py
diff options
context:
space:
mode:
authorJr Aquino <Jr.Aquino@citrix.com>2010-12-07 16:09:28 -0800
committerEndi Sukma Dewata <edewata@redhat.com>2010-12-08 10:30:02 -0500
commitcdf360151bf7212e90f6ae9983785d19ec2dfc9e (patch)
tree655e6d7c4ce8864f72068884dd2cf0281d35248e /ipalib/plugins/sudorule.py
parente1d6f9c6b94d96ca7d78a6eed64e9c705120d6fe (diff)
downloadfreeipa-cdf360151bf7212e90f6ae9983785d19ec2dfc9e.tar.gz
freeipa-cdf360151bf7212e90f6ae9983785d19ec2dfc9e.tar.xz
freeipa-cdf360151bf7212e90f6ae9983785d19ec2dfc9e.zip
Adding user/host category and ipaenabledflag https://fedorahosted.org/freeipa/ticket/570 This patch Addresses items: 1. The UI needs a rule status with values active & inactive. The CLI doesn't have this attribute. HBAC has ipaenabledflag attribute which can be managed using hbac-enable/disable operations. 2. The UI needs a user category for the "Who" section. The CLI doesn't have this attribute. HBAC has usercategory attribute which can be managed using hbac-add/mod operations. 3. The UI needs a host category for the "Access this host" section. The CLI doesn't have this attribute. HBAC has hostcategory attribute which can be managed using hbac-add/mod operations.
Diffstat (limited to 'ipalib/plugins/sudorule.py')
-rw-r--r--ipalib/plugins/sudorule.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/ipalib/plugins/sudorule.py b/ipalib/plugins/sudorule.py
index ff39fb9f5..0005e136f 100644
--- a/ipalib/plugins/sudorule.py
+++ b/ipalib/plugins/sudorule.py
@@ -58,6 +58,22 @@ class sudorule(LDAPObject):
cli_name='desc',
label=_('Description'),
),
+ Flag('ipaenabledflag?',
+ label=_('Enabled'),
+ flags=['no_create', 'no_update', 'no_search'],
+ ),
+ StrEnum('usercategory?',
+ cli_name='usercat',
+ label=_('User category'),
+ doc=_('User category the rule applies to'),
+ values=(u'all', ),
+ ),
+ StrEnum('hostcategory?',
+ cli_name='hostcat',
+ label=_('Host category'),
+ doc=_('Host category the rule applies to'),
+ values=(u'all', ),
+ ),
StrEnum('cmdcategory?',
cli_name='cmdcat',
label=_('Command category'),