[Zope-Checkins]
SVN: Zope/branches/2.9/lib/python/Testing/ZopeTestCase/testPythonScript.py
SecurityManager.validateValue no longer exists.
Stefan H. Holek
stefan at epy.co.at
Thu Mar 23 13:57:54 EST 2006
Log message for revision 66140:
SecurityManager.validateValue no longer exists.
Changed:
U Zope/branches/2.9/lib/python/Testing/ZopeTestCase/testPythonScript.py
-=-
Modified: Zope/branches/2.9/lib/python/Testing/ZopeTestCase/testPythonScript.py
===================================================================
--- Zope/branches/2.9/lib/python/Testing/ZopeTestCase/testPythonScript.py 2006-03-23 18:56:25 UTC (rev 66139)
+++ Zope/branches/2.9/lib/python/Testing/ZopeTestCase/testPythonScript.py 2006-03-23 18:57:54 UTC (rev 66140)
@@ -116,26 +116,28 @@
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')
More information about the Zope-Checkins
mailing list