[Zope3-checkins] CVS: Zope3/src/zope/app/publication - zopepublication.py:1.22
Albertas Agejevas
alga@codeworks.lt
Thu, 13 Mar 2003 11:28:20 -0500
Update of /cvs-repository/Zope3/src/zope/app/publication
In directory cvs.zope.org:/tmp/cvs-serv11423/src/zope/app/publication
Modified Files:
zopepublication.py
Log Message:
Made SecurityManager.getPrincipal() return a Principal object wrapped
in a context of its AuthenticationService.
=== Zope3/src/zope/app/publication/zopepublication.py 1.21 => 1.22 ===
--- Zope3/src/zope/app/publication/zopepublication.py:1.21 Fri Mar 7 19:51:42 2003
+++ Zope3/src/zope/app/publication/zopepublication.py Thu Mar 13 11:28:17 2003
@@ -71,9 +71,8 @@
if p is None:
raise Unauthorized # If there's no default principal
- newSecurityManager(p.getId())
- # XXX add a test to check that request.user is context wrapped
request.user = ContextWrapper(p, prin_reg)
+ newSecurityManager(request.user)
get_transaction().begin()
def _maybePlacefullyAuthenticate(self, request, ob):
@@ -106,9 +105,8 @@
# nothing to do here
return
- newSecurityManager(principal.getId())
- # XXX add test that request.user is context-wrapped
request.user = ContextWrapper(principal, auth_service)
+ newSecurityManager(request.user)
def callTraversalHooks(self, request, ob):