[CMF-checkins] CVS: CMF/CMFStaging/tests - testLockTool.py:1.3 testStaging.py:1.9
Chris McDonough
chrism@zope.com
Thu, 22 May 2003 11:24:04 -0400
Update of /cvs-repository/CMF/CMFStaging/tests
In directory cvs.zope.org:/tmp/cvs-serv16323/tests
Modified Files:
testLockTool.py testStaging.py
Log Message:
Don't try to protect tool methods with LockObjects/UnlockObjects permissions. We don't really care what permissions the user has against the tool, we care about the permissions the user has against the object. We inline the permission tests inside the various tool methods to provide access control.
=== CMF/CMFStaging/tests/testLockTool.py 1.2 => 1.3 ===
--- CMF/CMFStaging/tests/testLockTool.py:1.2 Thu Jan 2 16:56:42 2003
+++ CMF/CMFStaging/tests/testLockTool.py Thu May 22 11:24:03 2003
@@ -34,6 +34,12 @@
def __init__(self, id):
SimpleUser.__init__(self, id, '', (), ())
+ def has_permission(self, *arg, **kw):
+ return 1
+
+ def allowed(self, *arg, **kw):
+ return 1
+
class Tests(unittest.TestCase):
=== CMF/CMFStaging/tests/testStaging.py 1.8 => 1.9 ===
--- CMF/CMFStaging/tests/testStaging.py:1.8 Thu Jan 2 16:56:42 2003
+++ CMF/CMFStaging/tests/testStaging.py Thu May 22 11:24:03 2003
@@ -28,7 +28,6 @@
from Products.CMFStaging.StagingTool import StagingTool, StagingError
from Products.ZopeVersionControl.Utility import VersionControlError
-
class Tests(unittest.TestCase):
def setUp(self):
@@ -184,7 +183,7 @@
self.assert_(lt.auto_version)
self.assert_(st.auto_checkin)
- from testLockTool import TestUser
+ from Products.CMFStaging.tests.testLockTool import TestUser
user = TestUser('andre')
newSecurityManager(None, user.__of__(self.root.acl_users))