[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/ZopePublication - ZopePublication.py:1.5 configure.zcml:1.2
Jim Fulton
jim@zope.com
Thu, 20 Jun 2002 11:55:36 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/ZopePublication
In directory cvs.zope.org:/tmp/cvs-serv15462/lib/python/Zope/App/ZopePublication
Modified Files:
ZopePublication.py configure.zcml
Log Message:
implemented:
http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/MergeSecurityIntoZopeNamespace
While I was at it, I couldn't resist implementing a variation of:
http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/SecurityPackageReorg
which was a lot more work.
=== Zope3/lib/python/Zope/App/ZopePublication/ZopePublication.py 1.4 => 1.5 ===
from Zope.Security.SecurityManagement import getSecurityManager
from Zope.Security.SecurityManagement import newSecurityManager
-from Zope.App.Security.PrincipalRegistry import principalRegistry as prin_reg
+from Zope.App.Security.Registries.PrincipalRegistry \
+ import principalRegistry as prin_reg
from Zope.Exceptions import Unauthorized
from ZODB.POSException import ConflictError
@@ -62,7 +63,7 @@
def beforeTraversal(self, request):
id = prin_reg.authenticate(request)
if id is None:
- id = prin_reg.defaultPrincipal()
+ id = prin_reg.unauthenticatedPrincipal()
if id is None:
raise Unauthorized # If there's no default principal
newSecurityManager(id)
=== Zope3/lib/python/Zope/App/ZopePublication/configure.zcml 1.1 => 1.2 ===
xmlns='http://namespaces.zope.org/zope'
- xmlns:security='http://namespaces.zope.org/security'
xmlns:browser='http://namespaces.zope.org/browser'
xmlns:xmlrpc='http://namespaces.zope.org/xmlrpc'
>