summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2011-07-06 17:45:53 -0400
committerRob Crittenden <rcritten@redhat.com>2011-07-14 19:23:17 -0400
commitbea7818adde2712be3ee052634bdf314fd63b5da (patch)
tree6a81f97e87e9ef1b6795eebac4bc0e53cec20a6a /tests
parent9dfdf55034223e05c72e59239169be8cf315fc29 (diff)
downloadfreeipa-bea7818adde2712be3ee052634bdf314fd63b5da.tar.gz
freeipa-bea7818adde2712be3ee052634bdf314fd63b5da.tar.xz
freeipa-bea7818adde2712be3ee052634bdf314fd63b5da.zip
Remove the ability to create new HBAC deny rules.
New rules will all be allow type. Existing rules cannot be changed to deny. The type attribute now defaults to allow with autofill so it won't be prompted in interactive mode in the cli. https://fedorahosted.org/freeipa/ticket/1432
Diffstat (limited to 'tests')
-rw-r--r--tests/test_xmlrpc/test_hbac_plugin.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/test_xmlrpc/test_hbac_plugin.py b/tests/test_xmlrpc/test_hbac_plugin.py
index b2345cc4a..29e9f6c48 100644
--- a/tests/test_xmlrpc/test_hbac_plugin.py
+++ b/tests/test_xmlrpc/test_hbac_plugin.py
@@ -436,6 +436,31 @@ class test_hbac(XMLRPC_test):
finally:
api.Command['hbacrule_remove_service'](self.rule_name, hbacsvc=self.test_service)
+ def test_l_hbacrule_add(self):
+ """
+ Test adding a new HBAC rule with a deny type.
+ """
+ try:
+ api.Command['hbacrule_add'](
+ u'denyrule',
+ accessruletype=u'deny',
+ description=self.rule_desc,
+ )
+ except errors.ValidationError:
+ pass
+
+ def test_m_hbacrule_add(self):
+ """
+ Test changing an HBAC rule to the deny type
+ """
+ try:
+ api.Command['hbacrule_mod'](
+ self.rule_name,
+ accessruletype=u'deny',
+ )
+ except errors.ValidationError:
+ pass
+
def test_z_hbacrule_del(self):
"""
Test deleting a HBAC rule using `xmlrpc.hbacrule_del`.