[Zope3-checkins] CVS: Zope3/src/zope/publisher - base.py:1.14.2.1
browser.py:1.23.2.1 http.py:1.39.10.1
Marius Gedminas
marius at pov.lt
Fri Mar 19 13:51:26 EST 2004
Update of /cvs-repository/Zope3/src/zope/publisher
In directory cvs.zope.org:/tmp/cvs-serv26650/src/zope/publisher
Modified Files:
Tag: mgedmin-events2-branch
base.py browser.py http.py
Log Message:
Added IParticipation and replaced the lists of principals in IInteraction with
a list of participations. Made BaseRequest an IParticipation and replaced
request.user with request.principal everywhere.
=== Zope3/src/zope/publisher/base.py 1.14 => 1.14.2.1 ===
--- Zope3/src/zope/publisher/base.py:1.14 Mon Feb 16 16:37:19 2004
+++ Zope3/src/zope/publisher/base.py Fri Mar 19 13:50:54 2004
@@ -178,7 +178,8 @@
'_body', # The request body as a string
'_publication', # publication object
'_presentation_skin', # View skin
- '_user' # request user, set by publication
+ '_principal', # request principal, set by publication
+ 'interaction', # interaction, set by interaction
)
environment = RequestDataProperty(RequestEnvironment)
@@ -197,12 +198,13 @@
self._response = response
self._body_instream = body_instream
self._held = ()
- self._user = None
+ self._principal = None
+ self.interaction = None
- def setUser(self, user):
- self._user = user
+ def setPrincipal(self, principal):
+ self._principal = principal
- user = property(lambda self: self._user)
+ principal = property(lambda self: self._principal)
def _getPublication(self):
'See IPublisherRequest'
=== Zope3/src/zope/publisher/browser.py 1.23 => 1.23.2.1 ===
--- Zope3/src/zope/publisher/browser.py:1.23 Mon Feb 16 16:37:19 2004
+++ Zope3/src/zope/publisher/browser.py Fri Mar 19 13:50:55 2004
@@ -737,10 +737,10 @@
self.setPresentationSkin(skin)
- def setUser(self, user):
+ def setPrincipal(self, principal):
# HTTPRequest needs to notify the HTTPTask of the username.
# We don't want to have to stub HTTPTask in the tests.
- BaseRequest.setUser(self, user)
+ BaseRequest.setPrincipal(self, principal)
class BrowserResponse(HTTPResponse):
"""Browser response
=== Zope3/src/zope/publisher/http.py 1.39 => 1.39.10.1 ===
--- Zope3/src/zope/publisher/http.py:1.39 Thu Feb 5 17:52:35 2004
+++ Zope3/src/zope/publisher/http.py Fri Mar 19 13:50:55 2004
@@ -496,9 +496,9 @@
self._response.setHeader("WWW-Authenticate", challenge, True)
self._response.setStatus(401)
- def setUser(self, user):
+ def setPrincipal(self, principal):
'See IPublicationRequest'
- super(HTTPRequest, self).setUser(user)
+ super(HTTPRequest, self).setPrincipal(principal)
# XXX: under the publishing conditions,
# self.response.http_transaction is an HTTPTask. It needs to know
@@ -510,7 +510,7 @@
# the source for setAuthUserName, we had to stub that in
# several tests.
if self.response.http_transaction is not None:
- logging_info = getAdapter(user, ILoggingInfo)
+ logging_info = getAdapter(principal, ILoggingInfo)
message = logging_info.getLogMessage()
self.response.http_transaction.setAuthUserName(message)
More information about the Zope3-Checkins
mailing list