[CalendarServer-changes] [8589] CalendarServer/trunk/twistedcaldav

source_changes at macosforge.org source_changes at macosforge.org
Tue Jan 24 15:49:50 PST 2012


Revision: 8589
          http://trac.macosforge.org/projects/calendarserver/changeset/8589
Author:   cdaboo at apple.com
Date:     2012-01-24 15:49:50 -0800 (Tue, 24 Jan 2012)
Log Message:
-----------
Sync report now (optionally) disabled on home collections.

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/resource.py
    CalendarServer/trunk/twistedcaldav/stdconfig.py

Modified: CalendarServer/trunk/twistedcaldav/resource.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/resource.py	2012-01-24 23:48:39 UTC (rev 8588)
+++ CalendarServer/trunk/twistedcaldav/resource.py	2012-01-24 23:49:50 UTC (rev 8589)
@@ -2181,7 +2181,7 @@
 
     def supportedReports(self):
         result = super(CommonHomeResource, self).supportedReports()
-        if config.EnableSyncReport:
+        if config.EnableSyncReport and config.EnableSyncReportHome:
             # Allowed on any home
             result.append(davxml.Report(SyncCollection(),))
         return result
@@ -2462,7 +2462,10 @@
         Use the sync token as the etag
         """
         if self._newStoreHome:
-            token = (yield self.getInternalSyncToken())
+            if config.EnableSyncReport and config.EnableSyncReportHome:
+                token = (yield self.getInternalSyncToken())
+            else:
+                token = str(self._newStoreHome.modified())
             returnValue(ETag(hashlib.md5(token).hexdigest()))
         else:
             returnValue(None)

Modified: CalendarServer/trunk/twistedcaldav/stdconfig.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/stdconfig.py	2012-01-24 23:48:39 UTC (rev 8588)
+++ CalendarServer/trunk/twistedcaldav/stdconfig.py	2012-01-24 23:49:50 UTC (rev 8589)
@@ -486,6 +486,7 @@
     #
     "EnableAddMember"             : True,  # POST ;add-member extension
     "EnableSyncReport"            : True,  # REPORT collection-sync
+    "EnableSyncReportHome"        : False, # REPORT collection-sync on home collections
     "EnableWellKnown"             : True,  # /.well-known resource
     "EnableCalendarQueryExtended" : True,  # Extended calendar-query REPORT
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120124/760b6f5a/attachment.html>


More information about the calendarserver-changes mailing list