[Zope3-checkins] CVS: Zope3/src/zope/app/browser/container - contents.py:1.30.10.1

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


Update of /cvs-repository/Zope3/src/zope/app/browser/container
In directory cvs.zope.org:/tmp/cvs-serv26650/src/zope/app/browser/container

Modified Files:
      Tag: mgedmin-events2-branch
	contents.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/app/browser/container/contents.py 1.30 => 1.30.10.1 ===
--- Zope3/src/zope/app/browser/container/contents.py:1.30	Thu Feb  5 17:52:17 2004
+++ Zope3/src/zope/app/browser/container/contents.py	Fri Mar 19 13:50:10 2004
@@ -243,9 +243,9 @@
 
         container_path = zapi.getPath(self.context)
 
-        user = self.request.user
+        principal = self.request.principal
         annotationsvc = zapi.getService(self.context, 'PrincipalAnnotation')
-        annotations = annotationsvc.getAnnotations(user)
+        annotations = annotationsvc.getAnnotations(principal)
         clipboard = zapi.getAdapter(annotations, IPrincipalClipboard)
         clipboard.clearContents()
         items = []
@@ -263,9 +263,9 @@
 
         container_path = zapi.getPath(self.context)
 
-        user = self.request.user
+        principal = self.request.principal
         annotationsvc = zapi.getService(self.context, 'PrincipalAnnotation')
-        annotations = annotationsvc.getAnnotations(user)
+        annotations = annotationsvc.getAnnotations(principal)
         clipboard = zapi.getAdapter(annotations, IPrincipalClipboard)
         clipboard.clearContents()
         items = []
@@ -278,9 +278,9 @@
         """Decide if there is anything to paste
         """
         target = self.context
-        user = self.request.user
+        principal = self.request.principal
         annotationsvc = zapi.getService(self.context, 'PrincipalAnnotation')
-        annotations = annotationsvc.getAnnotations(user)
+        annotations = annotationsvc.getAnnotations(principal)
         clipboard = zapi.getAdapter(annotations, IPrincipalClipboard)
         items = clipboard.getContents()
         for item in items:
@@ -307,9 +307,9 @@
         """Paste ojects in the user clipboard to the container
         """
         target = self.context
-        user = self.request.user
+        principal = self.request.principal
         annotationsvc = zapi.getService(self.context, 'PrincipalAnnotation')
-        annotations = annotationsvc.getAnnotations(user)
+        annotations = annotationsvc.getAnnotations(principal)
         clipboard = zapi.getAdapter(annotations, IPrincipalClipboard)
         items = clipboard.getContents()
         moved = False
@@ -341,10 +341,10 @@
         if not self.supportsPaste:
             return False
 
-        user = self.request.user
+        principal = self.request.principal
 
         annotationsvc = zapi.getService(self.context, 'PrincipalAnnotation')
-        annotations = annotationsvc.getAnnotations(user)
+        annotations = annotationsvc.getAnnotations(principal)
 
         # touch at least one item to in clipboard confirm contents
         clipboard = zapi.getAdapter(annotations, IPrincipalClipboard)




More information about the Zope3-Checkins mailing list