From cdf360151bf7212e90f6ae9983785d19ec2dfc9e Mon Sep 17 00:00:00 2001 From: Jr Aquino Date: Tue, 7 Dec 2010 16:09:28 -0800 Subject: [PATCH] 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. --- ipalib/plugins/sudorule.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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'),