From df6b4adfc5d1180860e0d2f9dcbe780a8796714f Mon Sep 17 00:00:00 2001 From: Thiago da Silva Date: Mon, 16 Dec 2013 12:00:38 -0500 Subject: 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 Reviewed-on: http://review.gluster.org/6516 Reviewed-by: Luis Pabon Tested-by: Luis Pabon Reviewed-on: http://review.gluster.org/6690 Reviewed-by: pushpesh sharma Tested-by: pushpesh sharma --- test/functional_auth/gswauth/test_gswauth_cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/functional_auth/gswauth/test_gswauth_cli.py') 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) -- cgit