[CalendarServer-changes] [7058] CalendarServer/trunk/twistedcaldav/scheduling/implicit.py

source_changes at macosforge.org source_changes at macosforge.org
Sun Feb 20 12:35:13 PST 2011


Revision: 7058
          http://trac.macosforge.org/projects/calendarserver/changeset/7058
Author:   cdaboo at apple.com
Date:     2011-02-20 12:35:12 -0800 (Sun, 20 Feb 2011)
Log Message:
-----------
Handle events without any matching Organizer or Attendee.

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/scheduling/implicit.py

Modified: CalendarServer/trunk/twistedcaldav/scheduling/implicit.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/scheduling/implicit.py	2011-02-20 20:33:44 UTC (rev 7057)
+++ CalendarServer/trunk/twistedcaldav/scheduling/implicit.py	2011-02-20 20:35:12 UTC (rev 7058)
@@ -199,6 +199,10 @@
             self.state = "organizer"
         elif self.isAttendeeScheduling():
             self.state = "attendee"
+        elif self.organizer:
+            # There is an ORGANIZER that is not this user but no ATTENDEE property for
+            # the user.
+            self.state = "attendee-missing"
         else:
             self.state = None
 
@@ -224,6 +228,8 @@
             yield self.doImplicitOrganizer()
         elif self.state == "attendee":
             yield self.doImplicitAttendee()
+        elif self.state == "attendee-missing":
+            yield self.doImplicitMissingAttendee()
         else:
             returnValue(None)
 
@@ -876,6 +882,22 @@
                 log.debug("Implicit - attendee '%s' is updating UID without server scheduling: '%s'" % (self.attendee, self.uid))
                 # Nothing else to do
 
+    @inlineCallbacks
+    def doImplicitMissingAttendee(self):
+
+        if self.action == "remove":
+            # Nothing else to do
+            log.debug("Implicit - missing attendee is removing UID without server scheduling: '%s'" % (self.uid,))
+            returnValue(None)
+
+        else:
+            # We will allow the attendee to do anything in this case, but we will mark the organizer
+            # with an schedule-status error and schedule-agent none
+            log.debug("Missing attendee is allowed to update UID: '%s' with invalid organizer '%s'" % (self.uid, self.organizer))
+            self.calendar.setParameterToValueForPropertyWithValue("SCHEDULE-AGENT", "NONE", "ORGANIZER", None)
+            self.calendar.setParameterToValueForPropertyWithValue("SCHEDULE-STATUS", iTIPRequestStatus.NO_USER_SUPPORT_CODE, "ORGANIZER", None)
+            returnValue(None)
+
     def checkOrganizerScheduleAgent(self):
 
         is_server = self.calendar.getOrganizerScheduleAgent()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110220/5e573f83/attachment.html>


More information about the calendarserver-changes mailing list