summaryrefslogtreecommitdiffstats
path: root/test/functional_auth/gswauth/test_gswauth_cli.py
diff options
context:
space:
mode:
authorThiago da Silva <thiago@redhat.com>2013-12-16 12:00:38 -0500
committerLuis Pabon <lpabon@redhat.com>2014-01-14 11:55:03 -0800
commitdf6b4adfc5d1180860e0d2f9dcbe780a8796714f (patch)
tree4842885dc67a9cfa8b240f627e9d8548d15ada3c /test/functional_auth/gswauth/test_gswauth_cli.py
parent4c3ac4b341eb3a344f3035f4ae0df64fd492f4ac (diff)
Fix bug where admin is able to delete reseller_admin
Changed the code to only allow the super_admin to delete a reseller_admin. This follows the same logic of user creation, where only the super_admin can create a reseller_admin. Also, took the opportunity to refactor some code and implemented get_user_detail method to remove duplicated code Bug 1260239: https://bugs.launchpad.net/gluster-swift/+bug/1260239 Change-Id: I9e4866cd7ad08698f427846be566ab2364ad4850 Signed-off-by: Thiago da Silva <thiago@redhat.com> Reviewed-on: http://review.gluster.org/6516 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/6690 Reviewed-by: pushpesh sharma <psharma@redhat.com> Tested-by: pushpesh sharma <psharma@redhat.com>
Diffstat (limited to 'test/functional_auth/gswauth/test_gswauth_cli.py')
-rw-r--r--test/functional_auth/gswauth/test_gswauth_cli.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional_auth/gswauth/test_gswauth_cli.py b/test/functional_auth/gswauth/test_gswauth_cli.py
index bbaab5e..e228f31 100644
--- a/test/functional_auth/gswauth/test_gswauth_cli.py
+++ b/test/functional_auth/gswauth/test_gswauth_cli.py
@@ -493,12 +493,12 @@ class TestUser(unittest.TestCase):
self.assertEqual('403 Forbidden' in output,True, 're_admin deletion succeeded with re_admin user of other account: '+output)
'''
Utils.addResellerAdminUser('test2', 're_admintobedeletedbyotheraccountusers2', 'testing')
- (status,output) = Utils.deleteUser('test2', 're_admintobedeletedbyotherusers2',user='test:admin',key='testing')
+ (status,output) = Utils.deleteUser('test2', 're_admintobedeletedbyotheraccountusers2',user='test:admin',key='testing')
self.assertNotEqual(status, 0, 're_admin deletion succeeded with admin user of other account: '+output)
self.assertEqual('403 Forbidden' in output,True, 're_admin deletion succeeded with admin user of other account: '+output)
Utils.addResellerAdminUser('test2', 're_admintobedeletedbyotheraccountusers3', 'testing')
- (status,output) = Utils.deleteUser('test2', 're_admintobedeletedbyotherusers3',user='test:tester',key='testing')
+ (status,output) = Utils.deleteUser('test2', 're_admintobedeletedbyotheraccountusers3',user='test:tester',key='testing')
self.assertNotEqual(status, 0, 're_admin deletion succeeded with regular user of other account: '+output)
self.assertEqual('403 Forbidden' in output,True, 're_admin deletion succeeded with user of other account: '+output)