[CalendarServer-changes] [11153] CalendarServer/trunk

source_changes at macosforge.org source_changes at macosforge.org
Wed May 8 13:37:30 PDT 2013


Revision: 11153
          http://trac.calendarserver.org//changeset/11153
Author:   cdaboo at apple.com
Date:     2013-05-08 13:37:29 -0700 (Wed, 08 May 2013)
Log Message:
-----------
Provide a configurable white list of X- properties that it is OK to send from organizer to attendees.

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/stdconfig.py
    CalendarServer/trunk/txdav/caldav/datastore/scheduling/icaldiff.py
    CalendarServer/trunk/txdav/caldav/datastore/scheduling/itip.py
    CalendarServer/trunk/txdav/caldav/datastore/scheduling/test/test_itip.py

Modified: CalendarServer/trunk/twistedcaldav/stdconfig.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/stdconfig.py	2013-05-08 20:36:26 UTC (rev 11152)
+++ CalendarServer/trunk/twistedcaldav/stdconfig.py	2013-05-08 20:37:29 UTC (rev 11153)
@@ -644,6 +644,10 @@
                 "X-APPLE-TRAVEL-RETURN-DURATION",
                 "X-APPLE-TRAVEL-RETURN",
             ],
+            "OrganizerPublicProperties"  : [     # Names of X- iCalendar properties that are sent from ORGANIZER to ATTENDEE
+                "X-APPLE-DROPBOX",
+                "X-APPLE-STRUCTURED-LOCATION",
+            ],
         },
 
         "iSchedule": {

Modified: CalendarServer/trunk/txdav/caldav/datastore/scheduling/icaldiff.py
===================================================================
--- CalendarServer/trunk/txdav/caldav/datastore/scheduling/icaldiff.py	2013-05-08 20:36:26 UTC (rev 11152)
+++ CalendarServer/trunk/txdav/caldav/datastore/scheduling/icaldiff.py	2013-05-08 20:37:29 UTC (rev 11153)
@@ -73,9 +73,7 @@
                 "DTSTAMP",
                 "LAST-MODIFIED",
             ))
-            calendar.removeXProperties(keep_properties=(
-                "X-APPLE-DROPBOX",
-            ))
+            calendar.removeXProperties(keep_properties=config.Scheduling.CalDAV.OrganizerPublicProperties)
             calendar.removePropertyParameters("ATTENDEE", ("RSVP", "SCHEDULE-STATUS", "SCHEDULE-FORCE-SEND",))
             calendar.normalizeAll()
             return calendar

Modified: CalendarServer/trunk/txdav/caldav/datastore/scheduling/itip.py
===================================================================
--- CalendarServer/trunk/txdav/caldav/datastore/scheduling/itip.py	2013-05-08 20:36:26 UTC (rev 11152)
+++ CalendarServer/trunk/txdav/caldav/datastore/scheduling/itip.py	2013-05-08 20:37:29 UTC (rev 11153)
@@ -864,7 +864,7 @@
         # Component properties - remove all X- except for those specified
         if not reply:
             # Organizer properties that need to go to the Attendees
-            keep_properties = ("X-APPLE-DROPBOX",)
+            keep_properties = config.Scheduling.CalDAV.OrganizerPublicProperties
         else:
             # Attendee properties that need to go to the Organizer
             keep_properties = ("X-CALENDARSERVER-PRIVATE-COMMENT",)

Modified: CalendarServer/trunk/txdav/caldav/datastore/scheduling/test/test_itip.py
===================================================================
--- CalendarServer/trunk/txdav/caldav/datastore/scheduling/test/test_itip.py	2013-05-08 20:36:26 UTC (rev 11152)
+++ CalendarServer/trunk/txdav/caldav/datastore/scheduling/test/test_itip.py	2013-05-08 20:37:29 UTC (rev 11153)
@@ -20,12 +20,14 @@
 
 from twisted.trial import unittest
 
+from twistedcaldav.stdconfig import config
 from twistedcaldav.ical import Component
 
 from txdav.caldav.datastore.scheduling.itip import iTipProcessing, iTipGenerator
 
 import os
 
+hasattr(config, "Scheduling")   # Quell pyflakes
 
 class iTIPProcessing (unittest.TestCase):
     """
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130508/fe28b816/attachment.html>


More information about the calendarserver-changes mailing list