[CalendarServer-changes] [7288] CalendarServer/trunk

source_changes at macosforge.org source_changes at macosforge.org
Mon Apr 4 13:53:23 PDT 2011


Revision: 7288
          http://trac.macosforge.org/projects/calendarserver/changeset/7288
Author:   cdaboo at apple.com
Date:     2011-04-04 13:53:23 -0700 (Mon, 04 Apr 2011)
Log Message:
-----------
Re-subscribe to existing direct share now works.

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/sharing.py
    CalendarServer/trunk/txdav/common/datastore/sql_legacy.py

Modified: CalendarServer/trunk/twistedcaldav/sharing.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/sharing.py	2011-04-04 20:52:26 UTC (rev 7287)
+++ CalendarServer/trunk/twistedcaldav/sharing.py	2011-04-04 20:53:23 UTC (rev 7288)
@@ -195,7 +195,8 @@
             ))
 
         # Accept it
-        response = (yield home.acceptDirectShare(request, compareURL, self.resourceID(), self.displayName()))
+        directID = home.sharesDB().directShareID(home, self)
+        response = (yield home.acceptDirectShare(request, compareURL, directID, self.displayName()))
 
         # Return the URL of the shared calendar
         returnValue(response)
@@ -1245,6 +1246,9 @@
         self._db_close()
         os.remove(self.dbpath)
 
+    def directShareID(self, shareeHome, sharerCollection):
+        return "Direct-%s-%s" % (shareeHome.resourceID(), sharerCollection.resourceID(),)
+
     def _db_version(self):
         """
         @return: the schema version assigned to this index.

Modified: CalendarServer/trunk/txdav/common/datastore/sql_legacy.py
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/sql_legacy.py	2011-04-04 20:52:26 UTC (rev 7287)
+++ CalendarServer/trunk/txdav/common/datastore/sql_legacy.py	2011-04-04 20:53:23 UTC (rev 7288)
@@ -559,6 +559,8 @@
             all.append(record)
         returnValue(all)
 
+    def directShareID(self, shareeHome, sharerCollection):
+        return "Direct-%s-%s" % (shareeHome._newStoreHome._resourceID, sharerCollection._newStoreObject._resourceID,)
 
     @inlineCallbacks
     def _search(self, **kw):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110404/7869bf90/attachment-0001.html>


More information about the calendarserver-changes mailing list