[Zope3-checkins] CVS: Zope3/src/zope/app/security/registries -
principalregistry.py:1.10
Jim Fulton
jim at zope.com
Sun Sep 21 13:32:46 EDT 2003
Update of /cvs-repository/Zope3/src/zope/app/security/registries
In directory cvs.zope.org:/tmp/cvs-serv14628/src/zope/app/security/registries
Modified Files:
principalregistry.py
Log Message:
Need to set __parent__ and __name__ of default principal since we no
longer use context wrappers.
=== Zope3/src/zope/app/security/registries/principalregistry.py 1.9 => 1.10 ===
--- 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 Sun Sep 21 13:32:45 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