[Zope3-checkins] CVS: Zope3/src/zope/app/security/registries/tests - test_principalregistry.py:1.7
Jim Fulton
jim@zope.com
Mon, 2 Jun 2003 12:56:19 -0400
Update of /cvs-repository/Zope3/src/zope/app/security/registries/tests
In directory cvs.zope.org:/tmp/cvs-serv3969/src/zope/app/security/registries/tests
Modified Files:
test_principalregistry.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/registries/tests/test_principalregistry.py 1.6 => 1.7 ===
--- Zope3/src/zope/app/security/registries/tests/test_principalregistry.py:1.6 Thu May 1 15:35:33 2003
+++ Zope3/src/zope/app/security/registries/tests/test_principalregistry.py Mon Jun 2 12:55:48 2003
@@ -60,12 +60,10 @@
self.assertEqual(p.getId(), '1')
self.assertEqual(p.getTitle(), 'Tim Peters')
self.assertEqual(p.getDescription(), 'Sir Tim Peters')
- self.assertEqual(p.getRoles(), ())
p = self.reg.getPrincipal('2')
self.assertEqual(p.getId(), '2')
self.assertEqual(p.getTitle(), 'Jim Fulton')
self.assertEqual(p.getDescription(), 'Sir Jim Fulton')
- self.assertEqual(p.getRoles(), ())
self.assertEqual(len(self.reg.getPrincipals('')), 2)
@@ -140,7 +138,6 @@
p = self.reg.getPrincipal("anybody")
self.assertEquals(p.getId(), "anybody")
self.assertEquals(p.getTitle(), "Default Principal")
- self.assertEquals(p.getRoles(), ())
self.assertRaises(DuplicateId, self.reg.definePrincipal,
"anybody", "title")