[CalendarServer-changes] [11177] CalendarServer/branches/users/gaya/sharedgroups-3

source_changes at macosforge.org source_changes at macosforge.org
Mon May 13 21:17:34 PDT 2013


Revision: 11177
          http://trac.calendarserver.org//changeset/11177
Author:   gaya at apple.com
Date:     2013-05-13 21:17:34 -0700 (Mon, 13 May 2013)
Log Message:
-----------
more fixes for addressbooks

Modified Paths:
--------------
    CalendarServer/branches/users/gaya/sharedgroups-3/twistedcaldav/storebridge.py
    CalendarServer/branches/users/gaya/sharedgroups-3/txdav/carddav/datastore/sql.py
    CalendarServer/branches/users/gaya/sharedgroups-3/txdav/common/datastore/sql.py

Modified: CalendarServer/branches/users/gaya/sharedgroups-3/twistedcaldav/storebridge.py
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroups-3/twistedcaldav/storebridge.py	2013-05-14 01:50:25 UTC (rev 11176)
+++ CalendarServer/branches/users/gaya/sharedgroups-3/twistedcaldav/storebridge.py	2013-05-14 04:17:34 UTC (rev 11177)
@@ -445,14 +445,6 @@
 
         @type request: L{twext.web2.iweb.IRequest}
 
-        @param viaRequest: Indicates if the delete was a direct result of an http_DELETE
-        which for calendars at least will require implicit cancels to be sent.
-
-        @type request: C{bool}
-
-        @param where: the URI at which the resource is being deleted.
-        @type where: C{str}
-
         @return: an HTTP response suitable for sending to a client (or
             including in a multi-status).
 
@@ -1415,7 +1407,7 @@
 
 
     def resourceType(self,):
-        return davxml.ResourceType.dropboxhome # @UndefinedVariable
+        return davxml.ResourceType.dropboxhome  # @UndefinedVariable
 
 
     def listChildren(self):
@@ -1467,7 +1459,7 @@
 
 
     def resourceType(self):
-        return davxml.ResourceType.dropbox # @UndefinedVariable
+        return davxml.ResourceType.dropbox  # @UndefinedVariable
 
 
     @inlineCallbacks
@@ -1712,7 +1704,7 @@
 
 
     def resourceType(self,):
-        return davxml.ResourceType.dropboxhome # @UndefinedVariable
+        return davxml.ResourceType.dropboxhome  # @UndefinedVariable
 
 
     def listChildren(self):
@@ -1815,7 +1807,7 @@
 
 
     def resourceType(self,):
-        return davxml.ResourceType.dropbox # @UndefinedVariable
+        return davxml.ResourceType.dropbox  # @UndefinedVariable
 
 
     @inlineCallbacks
@@ -2007,7 +1999,7 @@
 
     def __init__(self, calendarObject, attachment, attachmentName, managed, **kw):
         super(CalendarAttachment, self).__init__(**kw)
-        self._newStoreCalendarObject = calendarObject # This can be None for a managed attachment
+        self._newStoreCalendarObject = calendarObject  # This can be None for a managed attachment
         self._newStoreAttachment = self._newStoreObject = attachment
         self._managed = managed
         self._dead_properties = NonePropertyStore(self)
@@ -3069,24 +3061,24 @@
 
 
     @inlineCallbacks
-    def storeRemove(self, request, viaRequest, where):
+    def storeRemove(self, request):
         """
         Remove this address book object
         """
         # Handle sharing
-        wasShared = (yield self.isShared(request))
+        wasShared = (yield self.isShared())
         if wasShared:
             yield self.downgradeFromShare(request)
 
         response = (
             yield super(AddressBookObjectResource, self).storeRemove(
-                request, viaRequest, where
+                request
             )
         )
 
         returnValue(response)
-        
-        
+
+
     @inlineCallbacks
     def http_PUT(self, request):
 
@@ -3207,7 +3199,7 @@
                 FORBIDDEN,
                 "Sharee cannot delete a shared group",)
             )
-    
+
     @inlineCallbacks
     def accessControlList(self, request, *a, **kw):
         """

Modified: CalendarServer/branches/users/gaya/sharedgroups-3/txdav/carddav/datastore/sql.py
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroups-3/txdav/carddav/datastore/sql.py	2013-05-14 01:50:25 UTC (rev 11176)
+++ CalendarServer/branches/users/gaya/sharedgroups-3/txdav/carddav/datastore/sql.py	2013-05-14 04:17:34 UTC (rev 11177)
@@ -2001,6 +2001,17 @@
         returnValue(self._component)
 
 
+    def moveValidation(self, destination, name):
+        """
+        Validate whether a move to the specified collection is allowed.
+
+        @param destination: destination address book collection
+        @type destination: L{AddressBookCollection}
+        @param name: name of new resource
+        @type name: C{str}
+        """
+        pass
+
     # IDataStoreObject
     def contentType(self):
         """

Modified: CalendarServer/branches/users/gaya/sharedgroups-3/txdav/common/datastore/sql.py
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroups-3/txdav/common/datastore/sql.py	2013-05-14 01:50:25 UTC (rev 11176)
+++ CalendarServer/branches/users/gaya/sharedgroups-3/txdav/common/datastore/sql.py	2013-05-14 04:17:34 UTC (rev 11177)
@@ -1839,31 +1839,7 @@
             )
         )
 
-    ''' temp for diff
-    @inlineCallbacks
-    def changesSinceToken(self, token):
-        """
-        return list of (path, name, wasdeleted) of changes since token
-        Subclasses may override
-        """
-        results = [
-            (
-                path if path else (collection if collection else ""),
-                name if name else "",
-                wasdeleted
-            )
-            for path, collection, name, wasdeleted in (
-                yield self._changesQuery.on(
-                    self._txn,
-                    resourceID=self._resourceID,
-                    token=token
-                )
-            )
-        ]
-        returnValue(results)
-    '''
 
-
     @inlineCallbacks
     def resourceNamesSinceToken(self, token, depth):  #@UnusedVariable
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130513/1c4be3ad/attachment-0001.html>


More information about the calendarserver-changes mailing list