[Zope3-checkins] CVS: Zope3/src/zope/app/services - auth.py:1.20

Jim Fulton jim at zope.com
Sun Sep 21 13:32:47 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/services
In directory cvs.zope.org:/tmp/cvs-serv14650/src/zope/app/services

Modified Files:
	auth.py 
Log Message:
No-longer use context wrappers.

Changed to use __setitem__ rather than setObject


=== Zope3/src/zope/app/services/auth.py 1.19 => 1.20 ===
--- Zope3/src/zope/app/services/auth.py:1.19	Sat Jun  7 01:31:58 2003
+++ Zope3/src/zope/app/services/auth.py	Sun Sep 21 13:32:46 2003
@@ -33,9 +33,9 @@
 from zope.proxy import removeAllProxies
 from zope.app.attributeannotations import AttributeAnnotations
 from zope.app.component.nextservice import getNextService
-from zope.context import ContextMethod
 from zope.app.interfaces.services.service import ISimpleService
 from zope.interface import implements
+from zope.app.container.contained import Contained, setitem, uncontained
 
 
 class DuplicateLogin(Exception):
@@ -45,7 +45,7 @@
     pass
 
 
-class AuthenticationService(Persistent):
+class AuthenticationService(Persistent, Contained):
 
     implements(IAuthenticationService, IContainer, ISimpleService)
 
@@ -78,8 +78,6 @@
         next = getNextService(self, Authentication)
         return next.authenticate(request)
 
-    authenticate = ContextMethod(authenticate)
-
     def unauthenticatedPrincipal(self):
         'See IAuthenticationService'
         return None
@@ -99,8 +97,6 @@
             next = getNextService(self, Authentication)
             return next.getPrincipal(id)
 
-    getPrincipal = ContextMethod(getPrincipal)
-
     def getPrincipals(self, name):
         'See IAuthenticationService'
         name = name.lower()
@@ -112,7 +108,10 @@
         'see IItemContainer'
         return self._usersbyid[id]
 
-    def setObject(self, key, object):
+    def __setitem__(self, key, object):
+        setitem(self, self.__setitem, key, object)
+
+    def __setitem(self, key, object):
         'See IWriteContainer'
         # XXX I think this should generate an id if blank is passed. (RDM)
         if not isinstance(key, (str, unicode)):




More information about the Zope3-Checkins mailing list