[Zope3-checkins] CVS: Zope3/src/zope/app/security/registries - principalregistry.py:1.9.24.1

Jim Fulton jim at zope.com
Thu Sep 11 07:31:33 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/security/registries
In directory cvs.zope.org:/tmp/cvs-serv1977/src/zope/app/security/registries

Modified Files:
      Tag: parentgeddon-branch
	principalregistry.py 
Log Message:
Got zope running with global principals

=== Zope3/src/zope/app/security/registries/principalregistry.py 1.9 => 1.9.24.1 ===
--- Zope3/src/zope/app/security/registries/principalregistry.py:1.9	Sat Jun  7 01:46:05 2003
+++ Zope3/src/zope/app/security/registries/principalregistry.py	Thu Sep 11 06:31:32 2003
@@ -24,6 +24,7 @@
 from zope.app.interfaces.security import IUnauthenticatedPrincipal
 from zope.app.interfaces.services.service import ISimpleService
 from zope.interface import implements
+from zope.app.container.contained import Contained, contained
 
 class DuplicateLogin(Exception): pass
 class DuplicateId(Exception): pass
@@ -55,7 +56,7 @@
             raise DuplicateId(id)
         self.__defaultid = id
         p = UnauthenticatedPrincipal(principal, title, description)
-        self.__defaultObject = p
+        self.__defaultObject = contained(p, self, id)
         return p
 
     def unauthenticatedPrincipal(self):
@@ -102,6 +103,7 @@
             raise DuplicateId(id)
 
         p = Principal(id, title, description, login, password)
+        p = contained(p, self, id)
 
         self.__principalsByLogin[login]=p
         self.__principalsById[id]=p
@@ -118,7 +120,7 @@
 addCleanUp(principalRegistry._clear)
 del addCleanUp
 
-class PrincipalBase:
+class PrincipalBase(Contained):
 
     def __init__(self, id, title, description):
         self.__id = id




More information about the Zope3-Checkins mailing list