[CalendarServer-changes] [3319] CalendarServer/branches/users/cdaboo/implicit-if-match-3306/ twistedcaldav

source_changes at macosforge.org source_changes at macosforge.org
Tue Nov 4 12:04:07 PST 2008


Revision: 3319
          http://trac.macosforge.org/projects/calendarserver/changeset/3319
Author:   cdaboo at apple.com
Date:     2008-11-04 12:04:07 -0800 (Tue, 04 Nov 2008)
Log Message:
-----------
Proper Schedule-Tag change logic.

Modified Paths:
--------------
    CalendarServer/branches/users/cdaboo/implicit-if-match-3306/twistedcaldav/method/put_common.py
    CalendarServer/branches/users/cdaboo/implicit-if-match-3306/twistedcaldav/scheduling/implicit.py
    CalendarServer/branches/users/cdaboo/implicit-if-match-3306/twistedcaldav/scheduling/processing.py

Modified: CalendarServer/branches/users/cdaboo/implicit-if-match-3306/twistedcaldav/method/put_common.py
===================================================================
--- CalendarServer/branches/users/cdaboo/implicit-if-match-3306/twistedcaldav/method/put_common.py	2008-11-04 19:52:26 UTC (rev 3318)
+++ CalendarServer/branches/users/cdaboo/implicit-if-match-3306/twistedcaldav/method/put_common.py	2008-11-04 20:04:07 UTC (rev 3319)
@@ -204,6 +204,7 @@
         isiTIP=False,
         allowImplicitSchedule=True,
         internal_request=False,
+        processing_organizer=None,
     ):
         """
         Function that does common PUT/COPY/MOVE behavior.
@@ -223,6 +224,7 @@
         @param isiTIP:                True if relaxed calendar data validation is to be done, False otherwise.
         @param allowImplicitSchedule: True if implicit scheduling should be attempted, False otherwise.
         @param internal_request:   True if this request originates internally and needs to bypass scheduling authorization checks.
+        @param processing_organizer: True if implicit processing for an organizer, False if for an attendee, None if not implicit processing.
         """
         
         # Check that all arguments are valid
@@ -262,6 +264,7 @@
         self.isiTIP = isiTIP
         self.allowImplicitSchedule = allowImplicitSchedule
         self.internal_request = internal_request
+        self.processing_organizer = processing_organizer
         
         self.rollback = None
         self.access = None
@@ -901,8 +904,14 @@
 
                 change_scheduletag = True
                 if self.internal_request:
-                    # TODO: Organizer vs Attendee logic
-                    change_scheduletag = False
+                    # Check what kind of processing is going on
+                    if self.processing_organizer == True:
+                        # All auto-processed updates for an Organizer leave the tag unchanged
+                        change_scheduletag = False
+                    elif self.processing_organizer == False:
+                        # Auto-processed updates that are the result of an organizer "refresh' due
+                        # to another Attendee's REPLY should leave the tag unchanged
+                        change_scheduletag = not hasattr(self.request, "doing_attendee_refresh")
 
                 if change_scheduletag or self.scheduletag is None:
                     self.scheduletag = str(uuid.uuid4())

Modified: CalendarServer/branches/users/cdaboo/implicit-if-match-3306/twistedcaldav/scheduling/implicit.py
===================================================================
--- CalendarServer/branches/users/cdaboo/implicit-if-match-3306/twistedcaldav/scheduling/implicit.py	2008-11-04 19:52:26 UTC (rev 3318)
+++ CalendarServer/branches/users/cdaboo/implicit-if-match-3306/twistedcaldav/scheduling/implicit.py	2008-11-04 20:04:07 UTC (rev 3319)
@@ -236,7 +236,11 @@
         self.originatorPrincipal = self.organizerPrincipal
         self.originator = self.organizer
         
-        result = (yield self.processRequests())
+        self.request.doing_attendee_refresh = True
+        try:
+            result = (yield self.processRequests())
+        finally:
+            delattr(self.request, "doing_attendee_refresh")
 
         returnValue(result)
 

Modified: CalendarServer/branches/users/cdaboo/implicit-if-match-3306/twistedcaldav/scheduling/processing.py
===================================================================
--- CalendarServer/branches/users/cdaboo/implicit-if-match-3306/twistedcaldav/scheduling/processing.py	2008-11-04 19:52:26 UTC (rev 3318)
+++ CalendarServer/branches/users/cdaboo/implicit-if-match-3306/twistedcaldav/scheduling/processing.py	2008-11-04 20:04:07 UTC (rev 3319)
@@ -537,6 +537,7 @@
                      isiTIP = False,
                      allowImplicitSchedule = False,
                      internal_request = True,
+                     processing_organizer = self.isOrganizerReceivingMessage(),
                  ).run()
     
         returnValue(newchild)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20081104/1ed00b47/attachment-0001.html>


More information about the calendarserver-changes mailing list