[Zope3-checkins] CVS: Zope3/src/zope/app/security/tests - test_zopepolicy.py:1.12
Jim Fulton
jim@zope.com
Mon, 2 Jun 2003 12:55:49 -0400
Update of /cvs-repository/Zope3/src/zope/app/security/tests
In directory cvs.zope.org:/tmp/cvs-serv3969/src/zope/app/security/tests
Modified Files:
test_zopepolicy.py
Log Message:
Removed getRolese from IPrincipal and from carious other code.
Principals don't have integral roles. In Zope 3, all grants,
including role grants are local. In the future, we'll probably
provide a way for local grants to be found from an auth service to
allow some principal grants to be stored centrally.
=== Zope3/src/zope/app/security/tests/test_zopepolicy.py 1.11 => 1.12 ===
--- Zope3/src/zope/app/security/tests/test_zopepolicy.py:1.11 Sun Jun 1 11:59:35 2003
+++ Zope3/src/zope/app/security/tests/test_zopepolicy.py Mon Jun 2 12:55:49 2003
@@ -61,7 +61,7 @@
pass
class Principal(PrincipalBase):
- def getRoles(self): return ['Manager']
+ pass
class Test(PlacefulSetup, unittest.TestCase):
@@ -185,14 +185,6 @@
self.policy.checkPermission(self.write, None, Context(self.jim)))
self.__assertPermissions(self.jim, ['create', 'read', 'write'])
-
-
- def testUserWithRoles(self):
- jim = Principal('jim','Jim','Jim Fulton')
- self.failUnless(
- self.policy.checkPermission(self.write, None, Context(jim)))
- self.__assertPermissions(jim, ['create', 'read', 'write'])
-
def testPlayfulPrincipalRole(self):
getService(None,Adapters).provideAdapter(