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

Jeremy Hylton jeremy@zope.com
Thu, 2 Jan 2003 10:47:25 -0500


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

Modified Files:
	zopepublication.py 
Log Message:
Log PATH_INFO for http requests.


=== Zope3/src/zope/app/publication/zopepublication.py 1.6 => 1.7 ===
--- Zope3/src/zope/app/publication/zopepublication.py:1.6	Thu Jan  2 08:57:36 2003
+++ Zope3/src/zope/app/publication/zopepublication.py	Thu Jan  2 10:47:22 2003
@@ -21,6 +21,7 @@
 from zope.publisher.base import DefaultPublication
 from zope.publisher.publish import mapply
 from zope.publisher.interfaces import Retry
+from zope.publisher.interfaces.http import IHTTPRequest
 
 from zope.security.management import getSecurityManager, newSecurityManager
 from zope.security.checker import ProxyFactory
@@ -157,9 +158,10 @@
 
     def afterCall(self, request):
         txn = get_transaction()
-        # XXX: Commented out this line, since it is HTTP-specific. 
-        # txn.note(request["PATH_INFO"])
-        txn.setUser(getSecurityManager().getPrincipal())
+        if IHTTPRequest.isImplementedBy(request):
+            txn.note(request["PATH_INFO"])
+        # XXX not sure why you would use id vs title or description
+        txn.setUser(request.user.getId())
         get_transaction().commit()
 
     def handleException(self, object, request, exc_info, retry_allowed=1):