[CalendarServer-changes] [1470]
CalendarServer/trunk/twistedcaldav/schedule.py
source_changes at macosforge.org
source_changes at macosforge.org
Tue Apr 10 20:48:11 PDT 2007
Revision: 1470
http://trac.macosforge.org/projects/calendarserver/changeset/1470
Author: cdaboo at apple.com
Date: 2007-04-10 20:48:11 -0700 (Tue, 10 Apr 2007)
Log Message:
-----------
Check validity of calendar URLs stored into CALDAV:calendar-free-busy-set property on Inbox.
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/schedule.py
Modified: CalendarServer/trunk/twistedcaldav/schedule.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/schedule.py 2007-04-11 03:16:10 UTC (rev 1469)
+++ CalendarServer/trunk/twistedcaldav/schedule.py 2007-04-11 03:48:11 UTC (rev 1470)
@@ -105,6 +105,7 @@
),
)
+ @deferredGenerator
def writeProperty(self, property, request):
assert isinstance(property, davxml.WebDAVElement)
@@ -119,8 +120,22 @@
(caldav_namespace, "valid-calendar-data")
))
- return super(ScheduleInboxResource, self).writeProperty(property, request)
+ elif property.qname() == (caldav_namespace, "calendar-free-busy-set"):
+ for href in property.children:
+ cal = waitForDeferred(request.locateResource(str(href)))
+ yield cal
+ cal = cal.getResult()
+ if cal is None or not cal.exists() or not isCalendarCollectionResource(cal):
+ # Validate that href's point to a valid calendar.
+ raise HTTPError(ErrorResponse(
+ responsecode.CONFLICT,
+ (caldav_namespace, "valid-calendar-url")
+ ))
+ d = waitForDeferred(super(ScheduleInboxResource, self).writeProperty(property, request))
+ yield d
+ yield d.getResult()
+
class ScheduleOutboxResource (CalendarSchedulingCollectionResource):
"""
CalDAV schedule Outbox resource.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20070410/23fdafcf/attachment.html
More information about the calendarserver-changes
mailing list