[Zope3-checkins] CVS: Zope3/src/zope/app/publication - zopepublication.py:1.34

Jim Fulton jim at zope.com
Tue Sep 2 17:47:19 EDT 2003


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

Modified Files:
	zopepublication.py 
Log Message:
Added ISite, which is a marker interface indicating that an object is
a site.

When an object is made into a site, ISite is declared for it.

Change to test whether something is a site by testing whether 
it (declares it) implements ISite.


=== Zope3/src/zope/app/publication/zopepublication.py 1.33 => 1.34 ===
--- Zope3/src/zope/app/publication/zopepublication.py:1.33	Fri Aug  8 14:07:16 2003
+++ Zope3/src/zope/app/publication/zopepublication.py	Tue Sep  2 16:46:48 2003
@@ -30,7 +30,7 @@
 
 from zope.proxy import removeAllProxies
 
-from zope.app.interfaces.services.service import IServiceManagerContainer
+from zope.app.interfaces.services.service import ISite
 
 from zope.exceptions import Unauthorized
 
@@ -85,15 +85,11 @@
             # Note that beforeTraversal guarentees that user is not None.
             return
 
-        if not IServiceManagerContainer.isImplementedBy(ob):
+        if not ISite.isImplementedBy(ob):
             # We won't find an authentication service here, so give up.
             return
 
-        sm = removeAllProxies(ob).queryServiceManager()
-        if sm is None:
-            # No service manager here, and thus no auth service
-            return
-
+        sm = removeAllProxies(ob).getSiteManager()
         sm = ContextWrapper(sm, ob, name="++etc++site")
 
         auth_service = sm.queryService(Authentication)




More information about the Zope3-Checkins mailing list