[Zope3-checkins] CVS: Zope3/src/zope/publisher/interfaces - __init__.py:1.15.2.1

Marius Gedminas marius at pov.lt
Fri Mar 19 13:51:28 EST 2004


Update of /cvs-repository/Zope3/src/zope/publisher/interfaces
In directory cvs.zope.org:/tmp/cvs-serv26650/src/zope/publisher/interfaces

Modified Files:
      Tag: mgedmin-events2-branch
	__init__.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/interfaces/__init__.py 1.15 => 1.15.2.1 ===
--- Zope3/src/zope/publisher/interfaces/__init__.py:1.15	Mon Feb 16 16:37:19 2004
+++ Zope3/src/zope/publisher/interfaces/__init__.py	Fri Mar 19 13:50:55 2004
@@ -24,6 +24,7 @@
 from zope.interface import implements
 from zope.interface.common.mapping import IEnumerableMapping
 from zope.interface.common.interfaces import IException
+from zope.security.interfaces import IParticipation
 
 class IPublishingException(IException):
     pass
@@ -279,16 +280,10 @@
         """
 
 
-class IPublicationRequest(IPresentationRequest):
+class IPublicationRequest(IPresentationRequest, IParticipation):
     """Interface provided by requests to IPublication objects
     """
 
-    user = Attribute("""User object associated with the request
-
-                        It is up to the publication object to set this
-                        attribute by calling the setUser method.
-                        """)
-
     response = Attribute("""The request's response object
 
         Return an IPublisherResponse for the request.
@@ -325,8 +320,8 @@
         It's up to the publication object to decide this.
         """
 
-    def setUser(user):
-        """Set the user attribute.
+    def setPrincipal(principal):
+        """Set the principal attribute.
 
         It should be IPrincipal wrapped in it's AuthenticationService's context.
         """
@@ -391,9 +386,9 @@
     """Features that support application logic
     """
 
-    user = Attribute("""User object associated with the request
-                        This is a read-only attribute.
-                        """)
+    principal = Attribute("""Principal object associated with the request
+                             This is a read-only attribute.
+                          """)
 
     body = Attribute("""The body of the request as a string""")
 




More information about the Zope3-Checkins mailing list