[Zope3-checkins] CVS: Zope3/src/zope/app/publication - httpfactory.py:1.5 zopepublication.py:1.32

Albertas Agejevas alga@codeworks.lt
Mon, 9 Jun 2003 12:39:44 -0400


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

Modified Files:
	httpfactory.py zopepublication.py 
Log Message:
Make authenticated principal name appear in the hit logs.

This forced us to do some marginal hockery that is best removed when the 
HTTP server machinery is refactored.  More info in the comments.


=== Zope3/src/zope/app/publication/httpfactory.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/publication/httpfactory.py:1.4	Fri Jun  6 16:25:30 2003
+++ Zope3/src/zope/app/publication/httpfactory.py	Mon Jun  9 12:39:13 2003
@@ -28,7 +28,6 @@
 from zope.app.publication.browser import BrowserPublication
 from zope.app.publication.xmlrpc import XMLRPCPublication
 
-
 moduleProvides(IPublicationRequestFactoryFactory)
 
 __metaclass__ = type
@@ -63,7 +62,7 @@
         else:
             request = HTTPRequest(input_stream, output_steam, env)
             request.setPublication(self._http)
-        
+
         return request
 
 realize = HTTPPublicationRequestFactory


=== Zope3/src/zope/app/publication/zopepublication.py 1.31 => 1.32 ===
--- Zope3/src/zope/app/publication/zopepublication.py:1.31	Sun Jun  1 11:59:34 2003
+++ Zope3/src/zope/app/publication/zopepublication.py	Mon Jun  9 12:39:13 2003
@@ -75,7 +75,7 @@
             if p is None:
                 raise Unauthorized # If there's no default principal
 
-        request.user = ContextWrapper(p, prin_reg)
+        request.setUser(ContextWrapper(p, prin_reg))
         newSecurityManager(request.user)
         get_transaction().begin()
 
@@ -109,7 +109,7 @@
                 # nothing to do here
                 return
 
-        request.user = ContextWrapper(principal, auth_service)
+        request.setUser(ContextWrapper(principal, auth_service))
         newSecurityManager(request.user)