From df62dab6a7798967ce9100fc2919e3112ea82595 Mon Sep 17 00:00:00 2001 From: "Stefan H. Holek" <stefan@epy.co.at> Date: Thu, 23 Mar 2006 18:56:25 +0000 Subject: [PATCH] SecurityManager.validateValue no longer works, so better not use it... --- lib/python/Testing/ZopeTestCase/testPythonScript.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/python/Testing/ZopeTestCase/testPythonScript.py b/lib/python/Testing/ZopeTestCase/testPythonScript.py index 5b2b29fc2..532c99d44 100644 --- a/lib/python/Testing/ZopeTestCase/testPythonScript.py +++ b/lib/python/Testing/ZopeTestCase/testPythonScript.py @@ -116,26 +116,28 @@ class TestPythonScript(ZopeTestCase.ZopeTestCase): def testCannotAccessWithoutAccessPermissionSecurityManager(self): # manage_main should be protected - self.assertRaises(Unauthorized, getSecurityManager().validateValue, self.ps.manage_main) + self.assertRaises(Unauthorized, getSecurityManager().validate, + self.ps, self.ps, 'manage_main', self.ps.manage_main) def testCanAccessWithAccessPermissionSecurityManager(self): # manage_main should be accessible if we have the necessary permissions self.setPermissions(access_permissions) try: - getSecurityManager().validateValue(self.ps.manage_main) + getSecurityManager().validate(self.ps, self.ps, 'manage_main', self.ps.manage_main) except Unauthorized: self.fail('Access to manage_main was denied') def testCannotAccessIfAnonymousSecurityManager(self): # manage_main should be protected from Anonymous self.logout() - self.assertRaises(Unauthorized, getSecurityManager().validateValue, self.ps.manage_main) + self.assertRaises(Unauthorized, getSecurityManager().validate, + self.ps, self.ps, 'manage_main', self.ps.manage_main) def testCanAccessIfManagerSecurityManager(self): # manage_main should be accessible to Manager self.setRoles(['Manager']) try: - getSecurityManager().validateValue(self.ps.manage_main) + getSecurityManager().validate(self.ps, self.ps, 'manage_main', self.ps.manage_main) except Unauthorized: self.fail('Access to manage_main was denied to Manager') -- 2.30.9