[CalendarServer-changes] [13740] CalendarServer/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Wed Jul 9 12:36:55 PDT 2014
Revision: 13740
http://trac.calendarserver.org//changeset/13740
Author: cdaboo at apple.com
Date: 2014-07-09 12:36:55 -0700 (Wed, 09 Jul 2014)
Log Message:
-----------
Shared all-day events default to transparent.
Modified Paths:
--------------
CalendarServer/trunk/calendarserver/tools/dbinspect.py
CalendarServer/trunk/twistedcaldav/datafilters/peruserdata.py
CalendarServer/trunk/twistedcaldav/datafilters/test/test_peruserdata.py
CalendarServer/trunk/twistedcaldav/ical.py
CalendarServer/trunk/twistedcaldav/method/get.py
CalendarServer/trunk/twistedcaldav/method/report_calendar_query.py
CalendarServer/trunk/twistedcaldav/method/report_common.py
CalendarServer/trunk/twistedcaldav/resource.py
CalendarServer/trunk/twistedcaldav/storebridge.py
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3184A66-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3184D26-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3185326-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C31854DA-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C31856AC-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318585A-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3185A14-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3185BBD-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3185D63-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3185F20-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C31860C8-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318627C-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3186426-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C31865E4-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3186792-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3186938-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3186ADE-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3186C96-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3186E3A-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3186FE7-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318719A-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3187343-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3188906-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3188B3A-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3188CFF-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3188EAA-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189058-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189203-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C31893C2-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189572-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189716-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C31898D4-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189A88-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189C32-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189DEC-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189F94-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318A148-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318A2F3-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318A4BA-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318A6E1-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318A898-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318AA54-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318ABFE-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318ADAA-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318AF53-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318B108-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318B2D2-1ED0-11D9-A5E0-000A958A3252.ics
CalendarServer/trunk/twistedcaldav/test/test_icalendar.py
CalendarServer/trunk/twistedcaldav/test/test_multiget.py
CalendarServer/trunk/txdav/caldav/datastore/scheduling/freebusy.py
CalendarServer/trunk/txdav/caldav/datastore/scheduling/processing.py
CalendarServer/trunk/txdav/caldav/datastore/sql.py
Modified: CalendarServer/trunk/calendarserver/tools/dbinspect.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/dbinspect.py 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/calendarserver/tools/dbinspect.py 2014-07-09 19:36:55 UTC (rev 13740)
@@ -37,7 +37,6 @@
from twistedcaldav import caldavxml
from twistedcaldav.config import config
-from twistedcaldav.datafilters.peruserdata import PerUserDataFilter
from twistedcaldav.directory import calendaruserproxy
from twistedcaldav.stdconfig import DEFAULT_CONFIG_FILE
@@ -98,7 +97,7 @@
@inlineCallbacks
def UserNameFromUID(txn, uid):
- record = yield txn.directoryService().recordWithGUID(uid)
+ record = yield txn.directoryService().recordWithUID(uid)
returnValue(record.shortNames[0] if record else "(%s)" % (uid,))
@@ -116,7 +115,7 @@
record = yield txn.directoryService().recordWithShortName(CalRecordType.resource, value)
if record is None:
record = yield txn.directoryService().recordWithShortName(RecordType.group, value)
- returnValue(record.guid if record else None)
+ returnValue(record.uid if record else None)
@@ -772,8 +771,7 @@
returnValue(None)
for name, _ignore_uid, _ignore_type in matches:
event = yield calendar.calendarObjectWithName(name)
- ical_data = yield event.component()
- ical_data = PerUserDataFilter(uid).filter(ical_data)
+ ical_data = yield event.componentForUser()
ical_data.stripStandardTimezones()
table = tables.Table()
Modified: CalendarServer/trunk/twistedcaldav/datafilters/peruserdata.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/datafilters/peruserdata.py 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/datafilters/peruserdata.py 2014-07-09 19:36:55 UTC (rev 13740)
@@ -109,45 +109,15 @@
# Now transfer any components over
if peruser_component:
- self._mergeBack(ical, peruser_component)
+ self._filterBack(ical, peruser_component)
+ else:
+ self._defaultFilter(ical)
return ical
- def merge(self, icalnew, icalold):
+ def _filterBack(self, ical, peruser):
"""
- Merge the new data with the old taking per-user information into account.
-
- @param icalnew: new calendar data
- @type icalnew: L{Component} or C{str}
- @param icalold: existing calendar data
- @type icalold: L{Component} or C{str}
-
- @return: L{Component} for the merged calendar data
- """
-
- # Make sure input is valid
- icalnew = self.validCalendar(icalnew)
-
- # There cannot be any X-CALENDARSERVER-PERUSER components in the new data
- for component in tuple(icalnew.subcomponents()):
- if component.name() == PERUSER_COMPONENT:
- raise ValueError("Cannot merge calendar data with X-CALENDARSERVER-PERUSER components in it")
-
- # First split the new data into common and per-user pieces
- self._splitPerUserData(icalnew)
- if icalold is None:
- return icalnew
-
- # Make sure input is valid
- icalold = self.validCalendar(icalold)
-
- self._mergeRepresentations(icalnew, icalold)
- return icalnew
-
-
- def _mergeBack(self, ical, peruser):
- """
Merge the per-user data back into the main calendar data.
@param ical: main calendar data to merge into
@@ -179,7 +149,7 @@
if ical_component is None:
continue
peruser_component = peruser_recurrence_map[rid]
- self._mergeBackComponent(ical_component, peruser_component)
+ self._filterBackComponent(ical_component, peruser_component)
ical.addComponent(ical_component)
elif peruser_only_set:
# We used to error out here, but instead we should silently ignore this error and keep going
@@ -189,7 +159,7 @@
for rid in union_set:
ical_component = ical.overriddenComponent(rid)
peruser_component = peruser_recurrence_map[rid]
- self._mergeBackComponent(ical_component, peruser_component)
+ self._filterBackComponent(ical_component, peruser_component)
# For ones in main data but no per-user data, we try and copy over the master per-user data
if ical_only_set:
@@ -197,16 +167,17 @@
if peruser_master:
for rid in ical_only_set:
ical_component = ical.overriddenComponent(rid)
- self._mergeBackComponent(ical_component, peruser_master)
+ self._filterBackComponent(ical_component, peruser_master)
- def _mergeBackComponent(self, ical, peruser):
+ def _filterBackComponent(self, ical, peruser):
"""
Copy all properties and sub-components from per-user data into the main component
- @param ical:
- @type ical:
- @param peruser:
- @type peruser:
+
+ @param ical: main calendar component data to merge into
+ @type ical: L{Component}
+ @param peruser: the per-user data to merge in
+ @type peruser: L{Component}
"""
# Each sub-component
@@ -220,6 +191,52 @@
ical.addProperty(property)
+ def _defaultFilter(self, ical):
+ """
+ There is no per-user component. Instead apply default properties to the data for this user.
+
+ @param ical: the iCalendar object to process
+ @type ical: L{Component}
+ """
+
+ # TRANSP property behavior: if the event is all-day add TRANSP:TRANSPARENT, otherwise do nothing
+ comp = ical.mainComponent()
+ if comp.name() == "VEVENT" and comp.propertyValue("DTSTART").isDateOnly() and not comp.hasProperty("TRANSP"):
+ ical.addPropertyToAllComponents(Property("TRANSP", "TRANSPARENT"))
+
+
+ def merge(self, icalnew, icalold):
+ """
+ Merge the new data with the old taking per-user information into account.
+
+ @param icalnew: new calendar data
+ @type icalnew: L{Component} or C{str}
+ @param icalold: existing calendar data
+ @type icalold: L{Component} or C{str}
+
+ @return: L{Component} for the merged calendar data
+ """
+
+ # Make sure input is valid
+ icalnew = self.validCalendar(icalnew)
+
+ # There cannot be any X-CALENDARSERVER-PERUSER components in the new data
+ for component in tuple(icalnew.subcomponents()):
+ if component.name() == PERUSER_COMPONENT:
+ raise ValueError("Cannot merge calendar data with X-CALENDARSERVER-PERUSER components in it")
+
+ # First split the new data into common and per-user pieces
+ self._splitPerUserData(icalnew)
+ if icalold is None:
+ return icalnew
+
+ # Make sure input is valid
+ icalold = self.validCalendar(icalold)
+
+ self._mergeRepresentations(icalnew, icalold)
+ return icalnew
+
+
def _splitPerUserData(self, ical):
"""
Split the per-user data out of the "normal" iCalendar components into separate per-user
@@ -249,6 +266,9 @@
perinstance_component = Component(PERINSTANCE_COMPONENT) if self.uid else None
perinstance_id_different = False
+ # Special case certain default property values
+ self._defaultMerge(component)
+
# Transfer per-user properties from main component to per-instance component
for property in tuple(component.properties()):
if property.name() in PerUserDataFilter.PERUSER_PROPERTIES or property.name().startswith("X-") and property.name() not in PerUserDataFilter.IGNORE_X_PROPERTIES:
@@ -316,6 +336,21 @@
ical.removeComponent(subcomponent)
+ def _defaultMerge(self, component):
+ """
+ Handle default property values during a merge.
+
+ @param component: the iCalendar component to process
+ @type component: L{Component}
+ """
+
+ # Special handling for TRANSP: if it is not present on an all-day event,
+ # add TRANSP:OPAQUE so that the default is explicitly included, since otherwise
+ # L_defaultFilter) will add TRANSP:TRANSPARENT
+ if component.name() == "VEVENT" and component.propertyValue("DTSTART").isDateOnly() and not component.hasProperty("TRANSP"):
+ component.addProperty(Property("TRANSP", "OPAQUE"))
+
+
def _mergeRepresentations(self, icalnew, icalold):
# Test for simple case first
Modified: CalendarServer/trunk/twistedcaldav/datafilters/test/test_peruserdata.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/datafilters/test/test_peruserdata.py 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/datafilters/test/test_peruserdata.py 2014-07-09 19:36:55 UTC (rev 13740)
@@ -6707,3 +6707,582 @@
result02 = PerUserDataFilter("user02").filter(peruser.duplicate())
self.assertEqual(str(result02), data02)
TimezoneCache.clear()
+
+
+
+class PerUserDataFilterTestTransp (twistedcaldav.test.util.TestCase):
+
+ def test_filter(self):
+
+ data = (
+ (
+ "Event timed, no per-user",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+BEGIN:VEVENT
+UID:12345-67890
+RECURRENCE-ID:20080602T120000Z
+DTSTART:20080602T130000Z
+DTEND:20080602T140000Z
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+END:VEVENT
+END:VCALENDAR
+""",
+ None,
+ None,
+ ),
+ (
+ "Event all-day, no per-user",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+BEGIN:VEVENT
+UID:12345-67890
+RECURRENCE-ID:20080602
+DTSTART;VALUE=DATE:20080602
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+END:VEVENT
+END:VCALENDAR
+""",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+TRANSP:TRANSPARENT
+END:VEVENT
+BEGIN:VEVENT
+UID:12345-67890
+RECURRENCE-ID;VALUE=DATE:20080602
+DTSTART;VALUE=DATE:20080602
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+TRANSP:TRANSPARENT
+END:VEVENT
+END:VCALENDAR
+""",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+TRANSP:TRANSPARENT
+END:VEVENT
+BEGIN:VEVENT
+UID:12345-67890
+RECURRENCE-ID;VALUE=DATE:20080602
+DTSTART;VALUE=DATE:20080602
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+TRANSP:TRANSPARENT
+END:VEVENT
+END:VCALENDAR
+""",
+ ),
+ (
+ "Event timed, per-user user01 no transp",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+BEGIN:X-CALENDARSERVER-PERUSER
+UID:12345-67890
+X-CALENDARSERVER-PERUSER-UID:user01
+BEGIN:X-CALENDARSERVER-PERINSTANCE
+X-FOO:BAR
+END:X-CALENDARSERVER-PERINSTANCE
+END:X-CALENDARSERVER-PERUSER
+END:VCALENDAR
+""",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+X-FOO:BAR
+END:VEVENT
+END:VCALENDAR
+""",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+END:VCALENDAR
+""",
+ ),
+ (
+ "Event all-day, per-user user01 no transp",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+BEGIN:X-CALENDARSERVER-PERUSER
+UID:12345-67890
+X-CALENDARSERVER-PERUSER-UID:user01
+BEGIN:X-CALENDARSERVER-PERINSTANCE
+X-FOO:BAR
+END:X-CALENDARSERVER-PERINSTANCE
+END:X-CALENDARSERVER-PERUSER
+END:VCALENDAR
+""",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+X-FOO:BAR
+END:VEVENT
+END:VCALENDAR
+""",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+TRANSP:TRANSPARENT
+END:VEVENT
+END:VCALENDAR
+""",
+ ),
+ (
+ "Event timed, per-user user01 with transp",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+BEGIN:X-CALENDARSERVER-PERUSER
+UID:12345-67890
+X-CALENDARSERVER-PERUSER-UID:user01
+BEGIN:X-CALENDARSERVER-PERINSTANCE
+X-FOO:BAR
+TRANSP:TRANSPARENT
+END:X-CALENDARSERVER-PERINSTANCE
+END:X-CALENDARSERVER-PERUSER
+END:VCALENDAR
+""",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+TRANSP:TRANSPARENT
+X-FOO:BAR
+END:VEVENT
+END:VCALENDAR
+""",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+END:VCALENDAR
+""",
+ ),
+ (
+ "Event all-day, per-user user01 with transp",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+BEGIN:X-CALENDARSERVER-PERUSER
+UID:12345-67890
+X-CALENDARSERVER-PERUSER-UID:user01
+BEGIN:X-CALENDARSERVER-PERINSTANCE
+X-FOO:BAR
+TRANSP:OPAQUE
+END:X-CALENDARSERVER-PERINSTANCE
+END:X-CALENDARSERVER-PERUSER
+END:VCALENDAR
+""",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+TRANSP:OPAQUE
+X-FOO:BAR
+END:VEVENT
+END:VCALENDAR
+""",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+TRANSP:TRANSPARENT
+END:VEVENT
+END:VCALENDAR
+""",
+ ),
+ )
+
+ for title, txt, result1, result2 in data:
+ txt = txt.replace("\n", "\r\n")
+ self.assertEqual(str(PerUserDataFilter("user01").filter(txt)), result1.replace("\n", "\r\n") if result1 is not None else txt, msg=title)
+ self.assertEqual(str(PerUserDataFilter("user02").filter(txt)), result2.replace("\n", "\r\n") if result2 is not None else txt, msg=title)
+
+
+ def test_merge(self):
+
+ data = (
+ (
+ "Event timed, no-existing per-user",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+END:VCALENDAR
+""",
+ "user01",
+ None,
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+END:VCALENDAR
+""",
+
+ ),
+ (
+ "Event all-day, no existing per-user",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+END:VCALENDAR
+""",
+ "user01",
+ None,
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+BEGIN:X-CALENDARSERVER-PERUSER
+UID:12345-67890
+X-CALENDARSERVER-PERUSER-UID:user01
+BEGIN:X-CALENDARSERVER-PERINSTANCE
+TRANSP:OPAQUE
+END:X-CALENDARSERVER-PERINSTANCE
+END:X-CALENDARSERVER-PERUSER
+END:VCALENDAR
+""",
+
+ ),
+ (
+ "Event timed, existing per-user",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+END:VCALENDAR
+""",
+ "user02",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+BEGIN:X-CALENDARSERVER-PERUSER
+UID:12345-67890
+X-CALENDARSERVER-PERUSER-UID:user01
+BEGIN:X-CALENDARSERVER-PERINSTANCE
+TRANSP:TRANSPARENT
+END:X-CALENDARSERVER-PERINSTANCE
+END:X-CALENDARSERVER-PERUSER
+END:VCALENDAR
+""",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+BEGIN:X-CALENDARSERVER-PERUSER
+UID:12345-67890
+X-CALENDARSERVER-PERUSER-UID:user01
+BEGIN:X-CALENDARSERVER-PERINSTANCE
+TRANSP:TRANSPARENT
+END:X-CALENDARSERVER-PERINSTANCE
+END:X-CALENDARSERVER-PERUSER
+END:VCALENDAR
+""",
+ ),
+ (
+ "Event all-day, existing per-user",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+END:VCALENDAR
+""",
+ "user02",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+BEGIN:X-CALENDARSERVER-PERUSER
+UID:12345-67890
+X-CALENDARSERVER-PERUSER-UID:user01
+BEGIN:X-CALENDARSERVER-PERINSTANCE
+TRANSP:OPAQUE
+END:X-CALENDARSERVER-PERINSTANCE
+END:X-CALENDARSERVER-PERUSER
+END:VCALENDAR
+""",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+ATTENDEE:mailto:user1 at example.com
+ATTENDEE:mailto:user2 at example.com
+DTSTAMP:20080601T120000Z
+ORGANIZER;CN=User 01:mailto:user1 at example.com
+RRULE:FREQ=DAILY
+END:VEVENT
+BEGIN:X-CALENDARSERVER-PERUSER
+UID:12345-67890
+X-CALENDARSERVER-PERUSER-UID:user02
+BEGIN:X-CALENDARSERVER-PERINSTANCE
+TRANSP:OPAQUE
+END:X-CALENDARSERVER-PERINSTANCE
+END:X-CALENDARSERVER-PERUSER
+BEGIN:X-CALENDARSERVER-PERUSER
+UID:12345-67890
+X-CALENDARSERVER-PERUSER-UID:user01
+BEGIN:X-CALENDARSERVER-PERINSTANCE
+TRANSP:OPAQUE
+END:X-CALENDARSERVER-PERINSTANCE
+END:X-CALENDARSERVER-PERUSER
+END:VCALENDAR
+""",
+
+ ),
+ )
+
+ for title, txt, user, before, after in data:
+ txt = txt.replace("\n", "\r\n")
+ self.assertEqual(str(PerUserDataFilter(user).merge(txt, before)), after.replace("\n", "\r\n"), msg=title)
Modified: CalendarServer/trunk/twistedcaldav/ical.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/ical.py 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/ical.py 2014-07-09 19:36:55 UTC (rev 13740)
@@ -3525,6 +3525,18 @@
return changed
+ def adjustedTransp(self):
+ """
+ Determine the TRANSP value for this component. Note that for all-day VEVENTs
+ we are going to treat the default as TRANSPARENT and not OPAQUE
+ """
+ transp = self.propertyValue("TRANSP")
+ if transp is None and self.name() == "VEVENT" and self.propertyValue("DTSTART").isDateOnly():
+ return "TRANSPARENT"
+ else:
+ return "OPAQUE" if transp is None else transp
+
+
def allPerUserUIDs(self):
results = set()
Modified: CalendarServer/trunk/twistedcaldav/method/get.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/method/get.py 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/method/get.py 2014-07-09 19:36:55 UTC (rev 13740)
@@ -87,7 +87,7 @@
if accepted_type is None:
raise HTTPError(StatusResponse(responsecode.NOT_ACCEPTABLE, "Cannot generate requested data type"))
- caldata = (yield self.iCalendarForUser(request))
+ caldata = (yield self.iCalendarForUser())
# Filter any attendee hidden instances
caldata = HiddenInstanceFilter().filter(caldata)
Modified: CalendarServer/trunk/twistedcaldav/method/report_calendar_query.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/method/report_calendar_query.py 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/method/report_calendar_query.py 2014-07-09 19:36:55 UTC (rev 13740)
@@ -216,7 +216,7 @@
child_uri_name = child_uri[child_uri.rfind("/") + 1:]
if generate_calendar_data or not index_query_ok:
- calendar = (yield child.iCalendarForUser(request))
+ calendar = (yield child.iCalendarForUser())
assert calendar is not None, "Calendar %s is missing from calendar collection %r" % (child_uri_name, self)
else:
calendar = None
@@ -240,7 +240,7 @@
# Check private events access status
isowner = (yield calresource.isOwner(request))
- calendar = (yield calresource.iCalendarForUser(request))
+ calendar = (yield calresource.iCalendarForUser())
yield queryCalendarObjectResource(calresource, uri, None, calendar, timezone)
returnValue(True)
Modified: CalendarServer/trunk/twistedcaldav/method/report_common.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/method/report_common.py 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/method/report_common.py 2014-07-09 19:36:55 UTC (rev 13740)
@@ -366,7 +366,7 @@
if isinstance(property, caldavxml.CalendarData):
# Handle private events access restrictions
if calendar is None:
- calendar = (yield resource.iCalendarForUser(request))
+ calendar = (yield resource.iCalendarForUser())
filtered = HiddenInstanceFilter().filter(calendar)
filtered = PrivateEventFilter(resource.accessMode, isowner).filter(filtered)
filtered = CalendarDataFilter(property, timezone).filter(filtered)
@@ -669,12 +669,12 @@
# Add extended details
if do_event_details:
child = (yield request.locateChildResource(calresource, name))
- calendar = (yield child.iCalendarForUser(request))
+ calendar = (yield child.iCalendarForUser())
_addEventDetails(calendar, event_details, rich_options, timerange, tzinfo)
else:
child = (yield request.locateChildResource(calresource, name))
- calendar = (yield child.iCalendarForUser(request))
+ calendar = (yield child.iCalendarForUser())
# The calendar may come back as None if the resource is being changed, or was deleted
# between our initial index query and getting here. For now we will ignore this error, but in
@@ -716,7 +716,7 @@
# Add extended details
if calendar.mainType() == "VEVENT" and do_event_details:
child = (yield request.locateChildResource(calresource, name))
- calendar = (yield child.iCalendarForUser(request))
+ calendar = (yield child.iCalendarForUser())
_addEventDetails(calendar, event_details, rich_options, timerange, tzinfo)
returnValue(matchtotal)
Modified: CalendarServer/trunk/twistedcaldav/resource.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/resource.py 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/resource.py 2014-07-09 19:36:55 UTC (rev 13740)
@@ -66,7 +66,6 @@
from twistedcaldav.config import config
from twistedcaldav.customxml import calendarserver_namespace
from twistedcaldav.datafilters.hiddeninstance import HiddenInstanceFilter
-from twistedcaldav.datafilters.peruserdata import PerUserDataFilter
from twistedcaldav.datafilters.privateevents import PrivateEventFilter
from twistedcaldav.extensions import DAVResource, DAVPrincipalResource, \
DAVResourceWithChildrenMixin
@@ -1059,20 +1058,6 @@
return self._newStoreParentHome.isDefaultCalendar(self._newStoreObject)
- @inlineCallbacks
- def iCalendarForUser(self, request):
-
- caldata = yield self.iCalendar()
-
- accessUID = (yield self.resourceOwnerPrincipal(request))
- if accessUID is None:
- accessUID = ""
- else:
- accessUID = accessUID.principalUID()
-
- returnValue(PerUserDataFilter(accessUID).filter(caldata))
-
-
def iCalendarAddressDoNormalization(self, ical):
"""
Normalize calendar user addresses in the supplied iCalendar object into their
@@ -1476,12 +1461,10 @@
@inlineCallbacks
- def iCalendarFiltered(self, isowner, accessUID=None):
+ def iCalendarFiltered(self, isowner):
# Now "filter" the resource calendar data
- caldata = (yield self.iCalendar())
- if accessUID:
- caldata = PerUserDataFilter(accessUID).filter(caldata)
+ caldata = (yield self.iCalendarForUser())
caldata = HiddenInstanceFilter().filter(caldata)
caldata = PrivateEventFilter(self.accessMode, isowner).filter(caldata)
returnValue(caldata)
Modified: CalendarServer/trunk/twistedcaldav/storebridge.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/storebridge.py 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/storebridge.py 2014-07-09 19:36:55 UTC (rev 13740)
@@ -1136,7 +1136,6 @@
tzids = set()
isowner = (yield self.isOwner(request))
- accessPrincipal = (yield self.resourceOwnerPrincipal(request))
for name in (yield self._newStoreObject.listObjectResources()):
try:
@@ -1153,7 +1152,7 @@
# Get the access filtered view of the data
try:
- subcalendar = yield child.iCalendarFiltered(isowner, accessPrincipal.principalUID() if accessPrincipal else "")
+ subcalendar = yield child.iCalendarFiltered(isowner)
except ValueError:
continue
assert subcalendar.name() == "VCALENDAR"
@@ -2675,6 +2674,7 @@
def componentForUser(self):
return self._newStoreObject.componentForUser()
+ iCalendarForUser = componentForUser
def validIfScheduleMatch(self, request):
"""
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3184A66-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3184A66-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3184A66-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20020102
RRULE:FREQ=YEARLY;INTERVAL=1;UNTIL=20031231;BYMONTH=1
SUMMARY:New Year's Day
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3184D26-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3184D26-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3184D26-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20020122
RRULE:FREQ=YEARLY;INTERVAL=1;UNTIL=20040118;BYMONTH=1;BYDAY=3MO
SUMMARY:Martin Luther King's Birthday (observed)
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3185326-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3185326-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3185326-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20020213
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=2
SUMMARY:Lincoln's Birthday
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C31854DA-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C31854DA-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C31854DA-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20020215
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=2
SUMMARY:Valentine's Day
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C31856AC-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C31856AC-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C31856AC-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20020219
RRULE:FREQ=YEARLY;INTERVAL=1;UNTIL=20040215;BYMONTH=2;BYDAY=3MO
SUMMARY:President's Day
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318585A-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318585A-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318585A-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20020223
RRULE:FREQ=YEARLY;INTERVAL=1;UNTIL=20040221;BYMONTH=2
SUMMARY:Washington's Birthday
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3185A14-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3185A14-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3185A14-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20020318
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=3
SUMMARY:St. Patrick's Day
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3185BBD-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3185BBD-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3185BBD-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -8,5 +8,6 @@
DTSTART;VALUE=DATE:20020331
DTEND;VALUE=DATE:20020401
SUMMARY:Easter
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3185D63-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3185D63-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3185D63-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20020416
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=4
SUMMARY:Tax Day
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3185F20-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3185F20-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3185F20-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20020513
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=5;BYDAY=2SU
SUMMARY:Mother's Day
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C31860C8-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C31860C8-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C31860C8-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20020528
RRULE:FREQ=YEARLY;INTERVAL=1;UNTIL=20040530;BYMONTH=5;BYDAY=-1MO
SUMMARY:Memorial Day
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318627C-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318627C-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318627C-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20020530
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=5
SUMMARY:John F. Kennedy's Birthday
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3186426-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3186426-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3186426-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20020617
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=6;BYDAY=3SU
SUMMARY:Father's Day
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C31865E4-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C31865E4-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C31865E4-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20020705
RRULE:FREQ=YEARLY;INTERVAL=1;UNTIL=20040703;BYMONTH=7
SUMMARY:Independence Day
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3186792-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3186792-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3186792-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20020903
RRULE:FREQ=YEARLY;INTERVAL=1;UNTIL=20040905;BYMONTH=9;BYDAY=1MO
SUMMARY:Labor Day
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3186938-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3186938-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3186938-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20021015
RRULE:FREQ=YEARLY;INTERVAL=1;UNTIL=20041010;BYMONTH=10;BYDAY=2MO
SUMMARY:Columbus Day
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3186ADE-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3186ADE-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3186ADE-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20021028
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=10;BYDAY=-1SU
SUMMARY:Daylight Saving Time Ends
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3186C96-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3186C96-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3186C96-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20021101
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=10
SUMMARY:Halloween
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3186E3A-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3186E3A-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3186E3A-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20021112
RRULE:FREQ=YEARLY;INTERVAL=1;UNTIL=20041110;BYMONTH=11
SUMMARY:Veteran's Day
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3186FE7-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3186FE7-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3186FE7-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20021129
RRULE:FREQ=YEARLY;INTERVAL=1;UNTIL=20041124;BYMONTH=11;BYDAY=4TH
SUMMARY:Thanksgiving
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318719A-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318719A-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318719A-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20021226
RRULE:FREQ=YEARLY;INTERVAL=1;UNTIL=20041224;BYMONTH=12
SUMMARY:Christmas Day
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3187343-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3187343-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3187343-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -8,5 +8,6 @@
DTSTART;VALUE=DATE:20030420
DTEND;VALUE=DATE:20030421
SUMMARY:Easter
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3188906-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3188906-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3188906-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20020408
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=4;BYDAY=1SU
SUMMARY:Daylight Saving Time Begins
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3188B3A-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3188B3A-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3188B3A-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -10,5 +10,6 @@
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=2
SEQUENCE:3
SUMMARY:Groundhog Day
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3188CFF-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3188CFF-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3188CFF-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DURATION:P1D
SEQUENCE:2
SUMMARY:April Fool's Day
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3188EAA-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3188EAA-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3188EAA-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -10,5 +10,6 @@
RRULE:FREQ=YEARLY;INTERVAL=1;UNTIL=20040502;BYMONTH=5;BYDAY=1MO
SEQUENCE:5
SUMMARY:May Day Bank Holiday
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189058-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189058-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189058-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -10,5 +10,6 @@
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=5
SEQUENCE:3
SUMMARY:Cinco de Mayo
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189203-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189203-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189203-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -10,5 +10,6 @@
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=6
SEQUENCE:3
SUMMARY:Flag Day
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C31893C2-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C31893C2-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C31893C2-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20050328
SEQUENCE:3
SUMMARY:Easter
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189572-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189572-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189572-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -10,5 +10,6 @@
RRULE:FREQ=YEARLY;INTERVAL=1
SEQUENCE:3
SUMMARY:April Fool's Day
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189716-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189716-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189716-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20040102
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=1
SUMMARY:New Year's Day\n(fed holiday)
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C31898D4-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C31898D4-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C31898D4-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20040120
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=1;BYDAY=3MO
SUMMARY:Martin Luther King's Birthday observed\n(fed holiday)
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189A88-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189A88-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189A88-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20040217
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=2;BYDAY=3MO
SUMMARY:President's Day\n(fed holiday)
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189C32-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189C32-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189C32-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20040223
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=2
SUMMARY:Washington's Birthday (actual)
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189DEC-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189DEC-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189DEC-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20040412
SEQUENCE:2
SUMMARY:Easter
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189F94-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189F94-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C3189F94-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20060417
SEQUENCE:2
SUMMARY:Easter
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318A148-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318A148-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318A148-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20040601
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=5;BYDAY=-1MO
SUMMARY:Memorial Day\n(fed holiday)
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318A2F3-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318A2F3-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318A2F3-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -10,5 +10,6 @@
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=5;BYDAY=1MO
SEQUENCE:5
SUMMARY:May Day (bank holiday)
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318A4BA-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318A4BA-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318A4BA-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20040705
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=7
SUMMARY:Independence Day\n(fed holiday)
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318A6E1-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318A6E1-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318A6E1-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20040907
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=9;BYDAY=1MO
SUMMARY:Labor Day\n(fed holiday)
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318A898-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318A898-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318A898-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20041012
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=10;BYDAY=2MO
SUMMARY:Columbus Day\n(fed holiday)
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318AA54-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318AA54-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318AA54-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20041112
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=11
SUMMARY:Veteran's Day\n(fed holiday)
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318ABFE-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318ABFE-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318ABFE-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -10,5 +10,6 @@
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=11;BYDAY=4TH
SEQUENCE:1
SUMMARY:Thanksgiving\n(fed holiday)
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318ADAA-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318ADAA-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318ADAA-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -9,5 +9,6 @@
DTEND;VALUE=DATE:20041226
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=12
SUMMARY:Christmas Day\n(fed holiday)
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318AF53-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318AF53-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318AF53-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -10,5 +10,6 @@
RRULE:FREQ=YEARLY;INTERVAL=1
SEQUENCE:3
SUMMARY:New Year's Eve
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318B108-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318B108-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318B108-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -10,5 +10,6 @@
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=9;BYDAY=2SU
SEQUENCE:3
SUMMARY:Grandparent's Day
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318B2D2-1ED0-11D9-A5E0-000A958A3252.ics
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318B2D2-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/data/Holidays/C318B2D2-1ED0-11D9-A5E0-000A958A3252.ics 2014-07-09 19:36:55 UTC (rev 13740)
@@ -11,5 +11,6 @@
November
SEQUENCE:2
SUMMARY:Election Day
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
Modified: CalendarServer/trunk/twistedcaldav/test/test_icalendar.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/test_icalendar.py 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/test_icalendar.py 2014-07-09 19:36:55 UTC (rev 13740)
@@ -10886,3 +10886,181 @@
changed = component.cleanOrganizerScheduleAgent()
self.assertEqual(sorted(normalize_iCalStr(component).splitlines()), sorted(normalize_iCalStr(result).splitlines()), msg=title)
self.assertEqual(changed, result_changed, msg=title)
+
+
+ def test_adjustedTransp(self):
+ """
+ Test that L{Component.adjustedTransp} returns the correct TRANSP value.
+ """
+
+ data = (
+ (
+ "Event timed, no TRANSP",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DURATION:PT1H
+DTSTAMP:20080601T120000Z
+ORGANIZER:mailto:user01 at example.com
+ATTENDEE:mailto:user01 at example.com
+ATTENDEE:mailto:user02 at example.com
+RRULE:FREQ=DAILY
+SUMMARY:Test
+END:VEVENT
+END:VCALENDAR
+""",
+ "OPAQUE",
+ ),
+ (
+ "Event timed, TRANSP:OPAQUE",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DURATION:PT1H
+DTSTAMP:20080601T120000Z
+ORGANIZER:mailto:user01 at example.com
+ATTENDEE:mailto:user01 at example.com
+ATTENDEE:mailto:user02 at example.com
+RRULE:FREQ=DAILY
+SUMMARY:Test
+TRANSP:OPAQUE
+END:VEVENT
+END:VCALENDAR
+""",
+ "OPAQUE",
+ ),
+ (
+ "Event timed, TRANSP:TRANSPARENT",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART:20080601T120000Z
+DURATION:PT1H
+DTSTAMP:20080601T120000Z
+ORGANIZER:mailto:user01 at example.com
+ATTENDEE:mailto:user01 at example.com
+ATTENDEE:mailto:user02 at example.com
+RRULE:FREQ=DAILY
+SUMMARY:Test
+TRANSP:TRANSPARENT
+END:VEVENT
+END:VCALENDAR
+""",
+ "TRANSPARENT",
+ ),
+ (
+ "Event all-day, no TRANSP",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+DTSTAMP:20080601T120000Z
+ORGANIZER:mailto:user01 at example.com
+ATTENDEE:mailto:user01 at example.com
+ATTENDEE:mailto:user02 at example.com
+RRULE:FREQ=DAILY
+SUMMARY:Test
+END:VEVENT
+END:VCALENDAR
+""",
+ "TRANSPARENT",
+ ),
+ (
+ "Event all-day, TRANSP:OPAQUE",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+DTSTAMP:20080601T120000Z
+ORGANIZER:mailto:user01 at example.com
+ATTENDEE:mailto:user01 at example.com
+ATTENDEE:mailto:user02 at example.com
+RRULE:FREQ=DAILY
+SUMMARY:Test
+TRANSP:OPAQUE
+END:VEVENT
+END:VCALENDAR
+""",
+ "OPAQUE",
+ ),
+ (
+ "Event all-day, TRANSP:TRANSPARENT",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VEVENT
+UID:12345-67890
+DTSTART;VALUE=DATE:20080601
+DURATION:PT1H
+DTSTAMP:20080601T120000Z
+ORGANIZER:mailto:user01 at example.com
+ATTENDEE:mailto:user01 at example.com
+ATTENDEE:mailto:user02 at example.com
+RRULE:FREQ=DAILY
+SUMMARY:Test
+TRANSP:TRANSPARENT
+END:VEVENT
+END:VCALENDAR
+""",
+ "TRANSPARENT",
+ ),
+ (
+ "Todo timed, no TRANSP",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VTODO
+UID:12345-67890
+DUE:20080601T120000Z
+DURATION:PT1H
+DTSTAMP:20080601T120000Z
+ORGANIZER:mailto:user01 at example.com
+ATTENDEE:mailto:user01 at example.com
+ATTENDEE:mailto:user02 at example.com
+RRULE:FREQ=DAILY
+SUMMARY:Test
+END:VTODO
+END:VCALENDAR
+""",
+ "OPAQUE",
+ ),
+ (
+ "Todo all-day, no TRANSP",
+ """BEGIN:VCALENDAR
+VERSION:2.0
+PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
+BEGIN:VTODO
+UID:12345-67890
+DUE;VALUE=DATE:20080601
+DURATION:PT1H
+DTSTAMP:20080601T120000Z
+ORGANIZER:mailto:user01 at example.com
+ATTENDEE:mailto:user01 at example.com
+ATTENDEE:mailto:user02 at example.com
+RRULE:FREQ=DAILY
+SUMMARY:Test
+END:VTODO
+END:VCALENDAR
+""",
+ "OPAQUE",
+ ),
+ )
+
+ for title, txt, result in data:
+ component = Component.fromString(txt).mainComponent()
+ transp = component.adjustedTransp()
+ self.assertEqual(transp, result, msg=title)
Modified: CalendarServer/trunk/twistedcaldav/test/test_multiget.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/test_multiget.py 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/twistedcaldav/test/test_multiget.py 2014-07-09 19:36:55 UTC (rev 13740)
@@ -136,6 +136,7 @@
DTSTAMP:20020101T121212Z
RRULE:FREQ=YEARLY;INTERVAL=1;UNTIL=20031231;BYMONTH=1
SUMMARY:New Year's Day
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
""".replace("\n", "\r\n"),
@@ -150,6 +151,7 @@
DTSTAMP:20020101T121212Z
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=2
SUMMARY:Valentine's Day
+TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
""".replace("\n", "\r\n")
Modified: CalendarServer/trunk/txdav/caldav/datastore/scheduling/freebusy.py
===================================================================
--- CalendarServer/trunk/txdav/caldav/datastore/scheduling/freebusy.py 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/txdav/caldav/datastore/scheduling/freebusy.py 2014-07-09 19:36:55 UTC (rev 13740)
@@ -356,6 +356,9 @@
fbtype,
))
+ # Cache directory record lookup outside this loop as it is expensive and will likely
+ # always end up being called with the same organizer address.
+ recordUIDCache = {}
for key in aggregated_resources.iterkeys():
name, uid, type, test_organizer = key
@@ -375,8 +378,14 @@
if excludeuid:
# See if we have a UID match
if (excludeuid == uid):
- test_record = (yield calresource.directoryService().recordWithCalendarUserAddress(test_organizer)) if test_organizer else None
- test_uid = test_record.uid if test_record else ""
+ if test_organizer:
+ test_uid = recordUIDCache.get(test_organizer)
+ if test_uid is None:
+ test_record = (yield calresource.directoryService().recordWithCalendarUserAddress(test_organizer))
+ test_uid = test_record.uid if test_record else ""
+ recordUIDCache[test_organizer] = test_uid
+ else:
+ test_uid = ""
# Check that ORGANIZER's match (security requirement)
if (organizer is None) or (organizer_uid == test_uid):
@@ -435,8 +444,14 @@
# See if we have a UID match
if (excludeuid == uid):
test_organizer = calendar.getOrganizer()
- test_record = (yield calresource.principalForCalendarUserAddress(test_organizer)) if test_organizer else None
- test_uid = test_record.principalUID() if test_record else ""
+ if test_organizer:
+ test_uid = recordUIDCache.get(test_organizer)
+ if test_uid is None:
+ test_record = (yield calresource.directoryService().recordWithCalendarUserAddress(test_organizer))
+ test_uid = test_record.uid if test_record else ""
+ recordUIDCache[test_organizer] = test_uid
+ else:
+ test_uid = ""
# Check that ORGANIZER's match (security requirement)
if (organizer is None) or (organizer_uid == test_uid):
Modified: CalendarServer/trunk/txdav/caldav/datastore/scheduling/processing.py
===================================================================
--- CalendarServer/trunk/txdav/caldav/datastore/scheduling/processing.py 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/txdav/caldav/datastore/scheduling/processing.py 2014-07-09 19:36:55 UTC (rev 13740)
@@ -43,6 +43,7 @@
import hashlib
import json
import uuid
+import time
"""
CalDAV implicit processing.
@@ -754,7 +755,9 @@
end=str(makeTimedUTC(instance.end)),
)
+ t = time.time()
yield generateFreeBusyInfo(testcal, fbinfo, tr, 0, uid, servertoserver=True, accountingItems=accounting if len(instances) == 1 else None)
+ print time.time() - t
# If any fbinfo entries exist we have an overlap
if len(fbinfo[0]) or len(fbinfo[1]) or len(fbinfo[2]):
Modified: CalendarServer/trunk/txdav/caldav/datastore/sql.py
===================================================================
--- CalendarServer/trunk/txdav/caldav/datastore/sql.py 2014-07-09 19:33:24 UTC (rev 13739)
+++ CalendarServer/trunk/txdav/caldav/datastore/sql.py 2014-07-09 19:36:55 UTC (rev 13740)
@@ -3065,7 +3065,7 @@
start = instance.start
end = instance.end
floating = instance.start.floating()
- transp = instance.component.propertyValue("TRANSP") == "TRANSPARENT"
+ transp = instance.component.adjustedTransp() == "TRANSPARENT"
fbtype = instance.component.getFBType()
start.setTimezoneUTC(True)
end.setTimezoneUTC(True)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140709/91d9c4ea/attachment-0001.html>
More information about the calendarserver-changes
mailing list