[Zope-Checkins] SVN: Zope/branches/Zope-2_8-branch/lib/python/Testing/ZopeTestCase/testPythonScript.py SecurityManager.validateValue no longer works, so better not use it...

Stefan H. Holek stefan at epy.co.at
Thu Mar 23 13:56:26 EST 2006


Log message for revision 66139:
  SecurityManager.validateValue no longer works, so better not use it...
  

Changed:
  U   Zope/branches/Zope-2_8-branch/lib/python/Testing/ZopeTestCase/testPythonScript.py

-=-
Modified: Zope/branches/Zope-2_8-branch/lib/python/Testing/ZopeTestCase/testPythonScript.py
===================================================================
--- Zope/branches/Zope-2_8-branch/lib/python/Testing/ZopeTestCase/testPythonScript.py	2006-03-23 18:35:00 UTC (rev 66138)
+++ Zope/branches/Zope-2_8-branch/lib/python/Testing/ZopeTestCase/testPythonScript.py	2006-03-23 18:56:25 UTC (rev 66139)
@@ -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