[CalendarServer-changes] [4794] CalendarServer/branches/release/CalendarServer-2.4-dev

source_changes at macosforge.org source_changes at macosforge.org
Fri Nov 20 15:35:26 PST 2009


Revision: 4794
          http://trac.macosforge.org/projects/calendarserver/changeset/4794
Author:   glyph at apple.com
Date:     2009-11-20 15:35:23 -0800 (Fri, 20 Nov 2009)
Log Message:
-----------
Pulled up r4784 from trunk, moving dependency to 'run' script.

Revision Links:
--------------
    http://trac.macosforge.org/projects/calendarserver/changeset/4784

Modified Paths:
--------------
    CalendarServer/branches/release/CalendarServer-2.4-dev/run
    CalendarServer/branches/release/CalendarServer-2.4-dev/twistedcaldav/scheduling/implicit.py
    CalendarServer/branches/release/CalendarServer-2.4-dev/twistedcaldav/scheduling/itip.py

Property Changed:
----------------
    CalendarServer/branches/release/CalendarServer-2.4-dev/


Property changes on: CalendarServer/branches/release/CalendarServer-2.4-dev
___________________________________________________________________
Modified: svn:mergeinfo
   - /CalendarServer/branches/users/sagen/resource-delegates-4038:4040-4067
/CalendarServer/branches/users/sagen/resource-delegates-4066:4068-4075
/CalendarServer/trunk:4439-4440,4448,4450,4464,4473-4475,4602,4711-4712,4716-4717,4722,4739-4742,4748-4752,4758,4760,4762,4773,4787
   + /CalendarServer/branches/users/sagen/resource-delegates-4038:4040-4067
/CalendarServer/branches/users/sagen/resource-delegates-4066:4068-4075
/CalendarServer/trunk:4439-4440,4448,4450,4464,4473-4475,4602,4711-4712,4716-4717,4722,4739-4742,4748-4752,4758,4760,4762,4773,4784,4787

Modified: CalendarServer/branches/release/CalendarServer-2.4-dev/run
===================================================================
--- CalendarServer/branches/release/CalendarServer-2.4-dev/run	2009-11-20 22:04:37 UTC (rev 4793)
+++ CalendarServer/branches/release/CalendarServer-2.4-dev/run	2009-11-20 23:35:23 UTC (rev 4794)
@@ -727,7 +727,7 @@
 
 caldavtester="${top}/CalDAVTester";
 
-svn_get "CalDAVTester" "${caldavtester}" "${svn_uri_base}/CalDAVTester/trunk" 4761;
+svn_get "CalDAVTester" "${caldavtester}" "${svn_uri_base}/CalDAVTester/trunk" 4783;
 
 #
 # PyFlakes

Modified: CalendarServer/branches/release/CalendarServer-2.4-dev/twistedcaldav/scheduling/implicit.py
===================================================================
--- CalendarServer/branches/release/CalendarServer-2.4-dev/twistedcaldav/scheduling/implicit.py	2009-11-20 22:04:37 UTC (rev 4793)
+++ CalendarServer/branches/release/CalendarServer-2.4-dev/twistedcaldav/scheduling/implicit.py	2009-11-20 23:35:23 UTC (rev 4794)
@@ -33,7 +33,7 @@
 from twistedcaldav.scheduling.cuaddress import InvalidCalendarUser,\
     LocalCalendarUser
 from twistedcaldav.scheduling.icaldiff import iCalDiff
-from twistedcaldav.scheduling.itip import iTipGenerator
+from twistedcaldav.scheduling.itip import iTipGenerator, iTIPRequestStatus
 from twistedcaldav.scheduling.scheduler import CalDAVScheduler
 from twistedcaldav.scheduling.utils import getCalendarObjectForPrincipals
 
@@ -796,6 +796,8 @@
                 if not doITipReply:
                     log.debug("Implicit - attendee '%s' is updating UID: '%s' but change is not significant" % (self.attendee, self.uid))
                     returnValue(None)
+                log.debug("Attendee '%s' is allowed to update UID: '%s' with local organizer '%s'" % (self.attendee, self.uid, self.organizer))
+
             elif isinstance(self.organizerAddress, LocalCalendarUser):
                 # Check to see whether all instances are CANCELLED
                 if self.calendar.hasPropertyValueInAllComponents(Property("STATUS", "CANCELLED")):
@@ -806,14 +808,24 @@
                     log.debug("Attendee '%s' is not allowed to update UID: '%s' - missing organizer copy - removing entire event" % (self.attendee, self.uid,))
                     self.return_status = ImplicitScheduler.STATUS_ORPHANED_EVENT
                     returnValue(None)
+
             elif isinstance(self.organizerAddress, InvalidCalendarUser):
-                log.debug("Attendee '%s' is not allowed to update UID: '%s' with invalid organizer '%s'" % (self.attendee, self.uid, self.organizer))
-                raise HTTPError(ErrorResponse(responsecode.FORBIDDEN, (caldav_namespace, "valid-attendee-change")))
+                # We will allow the attendee to do anything in this case, but we will mark the organizer
+                # with an schedule-status error
+                log.debug("Attendee '%s' is allowed to update UID: '%s' with invalid organizer '%s'" % (self.attendee, self.uid, self.organizer))
+                self.calendar.setParameterToValueForPropertyWithValue(
+                    "SCHEDULE-STATUS",
+                    iTIPRequestStatus.NO_USER_SUPPORT_CODE,
+                    "ORGANIZER",
+                    self.organizer)
+                returnValue(None)
+
             else:
                 # We have a remote Organizer of some kind. For now we will allow the Attendee
                 # to make any change they like as we cannot verify what is reasonable. In reality
                 # we ought to be comparing the Attendee changes against the attendee's own copy
                 # and restrict changes based on that when the organizer's copy is not available.
+                log.debug("Attendee '%s' is allowed to update UID: '%s' with remote organizer '%s'" % (self.attendee, self.uid, self.organizer))
                 changedRids = None
 
             log.debug("Implicit - attendee '%s' is updating UID: '%s'" % (self.attendee, self.uid))

Modified: CalendarServer/branches/release/CalendarServer-2.4-dev/twistedcaldav/scheduling/itip.py
===================================================================
--- CalendarServer/branches/release/CalendarServer-2.4-dev/twistedcaldav/scheduling/itip.py	2009-11-20 22:04:37 UTC (rev 4793)
+++ CalendarServer/branches/release/CalendarServer-2.4-dev/twistedcaldav/scheduling/itip.py	2009-11-20 23:35:23 UTC (rev 4794)
@@ -668,20 +668,30 @@
     String constants for various iTIP status codes we use.
     """
     
-    MESSAGE_PENDING_CODE    = "1.0"
-    MESSAGE_SENT_CODE       = "1.1"
-    MESSAGE_DELIVERED_CODE  = "1.2"
+    MESSAGE_PENDING_CODE        = "1.0"
+    MESSAGE_SENT_CODE           = "1.1"
+    MESSAGE_DELIVERED_CODE      = "1.2"
 
+    SUCCESS_CODE                = "2.0"
+
+    INVALID_CALENDAR_USER_CODE  = "3.7"
+    NO_AUTHORITY_CODE           = "3.8"
+
+    BAD_REQUEST_CODE            = "5.0"
+    SERVICE_UNAVAILABLE_CODE    = "5.1"
+    INVALID_SERVICE_CODE        = "5.2"
+    NO_USER_SUPPORT_CODE        = "5.3"
+
     MESSAGE_PENDING         = MESSAGE_PENDING_CODE + ";Scheduling message send is pending"
     MESSAGE_SENT            = MESSAGE_SENT_CODE + ";Scheduling message has been sent"
     MESSAGE_DELIVERED       = MESSAGE_DELIVERED_CODE + ";Scheduling message has been delivered"
     
-    SUCCESS                 = "2.0;Success"
+    SUCCESS                 = SUCCESS_CODE + ";Success"
 
-    INVALID_CALENDAR_USER   = "3.7;Invalid Calendar User"
-    NO_AUTHORITY            = "3.8;No authority"
+    INVALID_CALENDAR_USER   = INVALID_CALENDAR_USER_CODE + ";Invalid Calendar User"
+    NO_AUTHORITY            = NO_AUTHORITY_CODE + ";No authority"
 
-    BAD_REQUEST             = "5.0;Service cannot handle request"
-    SERVICE_UNAVAILABLE     = "5.1;Service unavailable"
-    INVALID_SERVICE         = "5.2;Invalid calendar service"
-    NO_USER_SUPPORT         = "5.3;No scheduling support for user"
+    BAD_REQUEST             = BAD_REQUEST_CODE + ";Service cannot handle request"
+    SERVICE_UNAVAILABLE     = SERVICE_UNAVAILABLE_CODE + ";Service unavailable"
+    INVALID_SERVICE         = INVALID_SERVICE_CODE + ";Invalid calendar service"
+    NO_USER_SUPPORT         = NO_USER_SUPPORT_CODE + ";No scheduling support for user"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20091120/69c5e39e/attachment.html>


More information about the calendarserver-changes mailing list