[Zope3-checkins] CVS: Zope3/src/zope/app/publication - zopepublication.py:1.3
Jeremy Hylton
jeremy@zope.com
Mon, 30 Dec 2002 16:07:14 -0500
Update of /cvs-repository/Zope3/src/zope/app/publication
In directory cvs.zope.org:/tmp/cvs-serv17140
Modified Files:
zopepublication.py
Log Message:
Add transaction metadata in afterCall(),
so that the url gets recorded with the transaction.
=== Zope3/src/zope/app/publication/zopepublication.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/publication/zopepublication.py:1.2 Wed Dec 25 09:13:08 2002
+++ Zope3/src/zope/app/publication/zopepublication.py Mon Dec 30 16:07:13 2002
@@ -22,8 +22,8 @@
from zope.publisher.publish import mapply
from zope.publisher.interfaces import Retry
-from zope.security.securitymanagement import getSecurityManager
-from zope.security.securitymanagement import newSecurityManager
+from zope.security.securitymanagement \
+ import getSecurityManager, newSecurityManager
from zope.security.checker import ProxyFactory
from zope.proxy.introspection import removeAllProxies
@@ -65,7 +65,6 @@
self.db = db
def beforeTraversal(self, request):
-
# Try to authenticate against the default global registry.
p = prin_reg.authenticate(request)
if p is None:
@@ -160,6 +159,10 @@
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
get_transaction().commit()
def handleException(self, object, request, exc_info, retry_allowed=1):