[CalendarServer-changes] [5115] CalendarServer/trunk/twistedcaldav/method/put_common.py

source_changes at macosforge.org source_changes at macosforge.org
Sun Feb 14 20:29:24 PST 2010


Revision: 5115
          http://trac.macosforge.org/projects/calendarserver/changeset/5115
Author:   cdaboo at apple.com
Date:     2010-02-14 20:29:23 -0800 (Sun, 14 Feb 2010)
Log Message:
-----------
Properly handle Attendee PUT of resource with missing local Organizer event.

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/method/put_common.py

Modified: CalendarServer/trunk/twistedcaldav/method/put_common.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/method/put_common.py	2010-02-15 04:28:24 UTC (rev 5114)
+++ CalendarServer/trunk/twistedcaldav/method/put_common.py	2010-02-15 04:29:23 UTC (rev 5115)
@@ -982,8 +982,13 @@
                         yield reservation.unreserve()
             
                     # Now forcibly delete the event
-                    deleter = DeleteResource(self.request, self.destination, self.destination_uri, self.destinationparent, "0", internal_request=True)
-                    yield deleter.run()
+                    if self.destination.exists():
+                        deleter = DeleteResource(self.request, self.destination, self.destination_uri, self.destinationparent, "0", internal_request=True)
+                        yield deleter.run()
+                    else:
+                        msg = "Attendee cannot create event for Organizer: %s" % (implicit_result,)
+                        log.err(msg)
+                        raise HTTPError(ErrorResponse(responsecode.FORBIDDEN, (caldav_namespace, "attendee-allowed"), description=msg))
 
                     returnValue(StatusResponse(responsecode.OK, "Resource modified but immediately deleted by the server."))
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100214/88369248/attachment.html>


More information about the calendarserver-changes mailing list