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

Jim Fulton jim at zope.com
Sat Mar 6 11:50:59 EST 2004


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

Modified Files:
	principalregistry.py 
Log Message:
Converted most getAdapter calls to use interface calls instead.


=== Zope3/src/zope/app/security/registries/principalregistry.py 1.10 => 1.11 ===
--- Zope3/src/zope/app/security/registries/principalregistry.py:1.10	Sun Sep 21 13:32:45 2003
+++ Zope3/src/zope/app/security/registries/principalregistry.py	Sat Mar  6 11:50:28 2004
@@ -19,7 +19,7 @@
 
 from zope.exceptions import NotFoundError
 from zope.app.interfaces.security import ILoginPassword
-from zope.component import getAdapter, queryAdapter
+from zope.component import queryAdapter
 from zope.app.interfaces.security import IAuthenticationService, IPrincipal
 from zope.app.interfaces.security import IUnauthenticatedPrincipal
 from zope.app.interfaces.services.service import ISimpleService
@@ -65,7 +65,7 @@
     def unauthorized(self, id, request):
         # XXX This is a mess. request has no place here!
         if id is None or id is self.__defaultid:
-            a = getAdapter(request, ILoginPassword)
+            a = ILoginPassword(request)
             a.needLogin(realm="zope")
 
     def getPrincipal(self, id):




More information about the Zope3-Checkins mailing list