[Zope3-checkins] CVS: Zope3/src/zope/app/publication - zopepublication.py:1.4
Jeremy Hylton
jeremy@zope.com
Mon, 30 Dec 2002 17:11:31 -0500
Update of /cvs-repository/Zope3/src/zope/app/publication
In directory cvs.zope.org:/tmp/cvs-serv25832
Modified Files:
zopepublication.py
Log Message:
Log principal along with path when transaction commits.
=== Zope3/src/zope/app/publication/zopepublication.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/publication/zopepublication.py:1.3 Mon Dec 30 16:07:13 2002
+++ Zope3/src/zope/app/publication/zopepublication.py Mon Dec 30 17:11:31 2002
@@ -28,8 +28,7 @@
from zope.proxy.introspection import removeAllProxies
-from zope.app.interfaces.services.service \
- import IServiceManagerContainer
+from zope.app.interfaces.services.service import IServiceManagerContainer
from zope.exceptions import Unauthorized
@@ -39,8 +38,7 @@
from zope.app.security.registries.principalregistry \
import principalRegistry as prin_reg
-from zope.app.interfaces.security \
- import IUnauthenticatedPrincipal
+from zope.app.interfaces.security import IUnauthenticatedPrincipal
from zope.app.publication.publicationtraverse import PublicationTraverse
@@ -159,10 +157,9 @@
return mapply(ob, request.getPositionalArguments(), request)
def afterCall(self, request):
- T = get_transaction()
- T.note(request["PATH_INFO"])
- # XXX should also call T.setUser(), but I don't know how to
- # find out who the user is
+ txn = get_transaction()
+ txn.note(request["PATH_INFO"])
+ txn.setUser(getSecurityManager().getPrincipal())
get_transaction().commit()
def handleException(self, object, request, exc_info, retry_allowed=1):