[CMF-checkins] CVS: CMF/CMFCore/tests - test_MembershipTool.py:1.8

Yvo Schubbe schubbe at web.de
Mon Sep 29 07:19:40 EDT 2003


Update of /cvs-repository/CMF/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv26179/CMFCore/tests

Modified Files:
	test_MembershipTool.py 
Log Message:
fixed getCandidateLocalRoles:
- filter out 'Member' correctly (Collector #148 and #169)
- also filter out 'Authenticated'
changed permissions:
- protect user management methods by 'Manage users', not 'Manage portal'
updated interface and added Local Roles methods to it

=== CMF/CMFCore/tests/test_MembershipTool.py 1.7 => 1.8 ===
--- CMF/CMFCore/tests/test_MembershipTool.py:1.7	Wed Sep 24 06:02:15 2003
+++ CMF/CMFCore/tests/test_MembershipTool.py	Mon Sep 29 07:19:39 2003
@@ -42,6 +42,17 @@
         self.site = DummySite('site').__of__(self.root)
         self.mtool = MembershipTool().__of__(self.site)
 
+    def test_getCandidateLocalRoles(self):
+        mtool = self.mtool
+        acl_users = self.site._setObject( 'acl_users', DummyUserFolder() )
+
+        newSecurityManager(None, acl_users.user_foo)
+        rval = mtool.getCandidateLocalRoles(mtool)
+        self.assertEqual( rval, ('Dummy',) )
+        newSecurityManager(None, acl_users.all_powerful_Oz)
+        rval = mtool.getCandidateLocalRoles(mtool)
+        self.assertEqual( rval, ('Manager', 'Member', 'Owner', 'Reviewer') )
+
     def test_createMemberArea(self):
         mtool = self.mtool
         members = self.site._setObject( 'Members', PortalFolder('Members') )




More information about the CMF-checkins mailing list