[Zope3-checkins] CVS: Zope3/src/zope/publisher - http.py:1.29
Viktorija Zaksiene
ryzaja@codeworks.lt
Tue, 22 Jul 2003 11:10:17 -0400
Update of /cvs-repository/Zope3/src/zope/publisher
In directory cvs.zope.org:/tmp/cvs-serv14056/src/zope/publisher
Modified Files:
http.py
Log Message:
Vika and Bjorn Tillenius:
Made HTTPRequest.setUser use an adapter to choose what name to log. We don't want to
make policy decisions there.
=== Zope3/src/zope/publisher/http.py 1.28 => 1.29 ===
--- Zope3/src/zope/publisher/http.py:1.28 Tue Jul 22 05:33:34 2003
+++ Zope3/src/zope/publisher/http.py Tue Jul 22 11:09:41 2003
@@ -22,6 +22,7 @@
from cgi import escape
from zope.interface import implements
+from zope.component import getAdapter
from zope.publisher.interfaces.http import IHTTPCredentials
from zope.publisher.interfaces.http import IHTTPRequest
@@ -32,6 +33,7 @@
from zope.publisher.interfaces import Redirect
from zope.publisher.interfaces.http import IHTTPResponse
from zope.publisher.interfaces.http import IHTTPApplicationResponse
+from zope.publisher.interfaces.logginginfo import ILoggingInfo
from zope.i18n.interfaces import IUserPreferredCharsets
from zope.i18n.locales import locales, LoadLocaleError
@@ -520,7 +522,9 @@
# the source for setAuthUserName, we had to stub that in
# several tests.
if self.response.http_transaction is not None:
- self.response.http_transaction.setAuthUserName(user.getId())
+ logging_info = getAdapter(user, ILoggingInfo)
+ message = logging_info.getLogMessage()
+ self.response.http_transaction.setAuthUserName(message)
#
############################################################