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

source_changes at macosforge.org source_changes at macosforge.org
Tue May 21 10:46:04 PDT 2013


Revision: 11230
          http://trac.calendarserver.org//changeset/11230
Author:   cdaboo at apple.com
Date:     2013-05-21 10:46:04 -0700 (Tue, 21 May 2013)
Log Message:
-----------
Fix depth handling for sync of notification collection.

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

Modified: CalendarServer/trunk/twistedcaldav/resource.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/resource.py	2013-05-21 17:44:43 UTC (rev 11229)
+++ CalendarServer/trunk/twistedcaldav/resource.py	2013-05-21 17:46:04 UTC (rev 11230)
@@ -2657,9 +2657,12 @@
         if config.Sharing.Enabled and config.Sharing.Calendars.Enabled:
             noti_changed, noti_deleted, noti_notallowed = yield (yield self.getChild("notification"))._indexWhatChanged(revision, depth)
 
-            changed.extend([joinURL("notification", name) for name in noti_changed])
-            deleted.extend([joinURL("notification", name) for name in noti_deleted])
-            notallowed.extend([joinURL("notification", name) for name in noti_notallowed])
+            if noti_changed or noti_deleted:
+                changed.append("notification")
+            if depth == "infinity":
+                changed.extend([joinURL("notification", name) for name in noti_changed])
+                deleted.extend([joinURL("notification", name) for name in noti_deleted])
+                notallowed.extend([joinURL("notification", name) for name in noti_notallowed])
 
         returnValue((changed, deleted, notallowed))
 
@@ -2670,14 +2673,13 @@
     Address book home collection resource.
     """
 
-
     def __init__(self, *args, **kw):
         super(AddressBookHomeResource, self).__init__(*args, **kw)
         # get some Access header items
         self.http_MKCOL = None
         self.http_MKCALENDAR = None
-        
 
+
     @classmethod
     @inlineCallbacks
     def homeFromTransaction(cls, transaction, uid):

Modified: CalendarServer/trunk/twistedcaldav/storebridge.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/storebridge.py	2013-05-21 17:44:43 UTC (rev 11229)
+++ CalendarServer/trunk/twistedcaldav/storebridge.py	2013-05-21 17:46:04 UTC (rev 11230)
@@ -3169,15 +3169,16 @@
                 "Sharee cannot delete a shared group",)
             )
 
+
     @inlineCallbacks
     def accessControlList(self, request, *a, **kw):
         """
         Return WebDAV ACLs appropriate for the current user accessing the
         a vcard in a shared addressbook or shared group.
-        
-        Items in an "invite" share get read-onlly privileges.
+
+        Items in an "invite" share get read-only privileges.
         (It's not clear if that case ever occurs)
-        
+
         "direct" shares are not supported.
 
         @param request: the request used to locate the owner resource.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130521/a3026782/attachment.html>


More information about the calendarserver-changes mailing list