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

source_changes at macosforge.org source_changes at macosforge.org
Mon May 13 14:05:58 PDT 2013


Revision: 11174
          http://trac.calendarserver.org//changeset/11174
Author:   gaya at apple.com
Date:     2013-05-13 14:05:58 -0700 (Mon, 13 May 2013)
Log Message:
-----------
fix twistedcaldav.test.test_sharing.SharingTests.test_noWikiAccess and cleaning

Modified Paths:
--------------
    CalendarServer/branches/users/gaya/sharedgroups-3/twistedcaldav/storebridge.py
    CalendarServer/branches/users/gaya/sharedgroups-3/twistedcaldav/test/test_addressbookmultiget.py
    CalendarServer/branches/users/gaya/sharedgroups-3/twistedcaldav/test/test_addressbookquery.py
    CalendarServer/branches/users/gaya/sharedgroups-3/txdav/carddav/datastore/sql.py
    CalendarServer/branches/users/gaya/sharedgroups-3/txdav/carddav/datastore/test/common.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-13 19:59:27 UTC (rev 11173)
+++ CalendarServer/branches/users/gaya/sharedgroups-3/twistedcaldav/storebridge.py	2013-05-13 21:05:58 UTC (rev 11174)
@@ -2969,7 +2969,7 @@
         else:
             returnValue(None)
 
-
+    ''' DELETE just re-creates addressbook
     @inlineCallbacks
     def storeRemove(self, request):
         """
@@ -3006,6 +3006,7 @@
         )
 
         returnValue(response)
+    '''
 
 
     def http_MOVE(self, request):
@@ -3207,7 +3208,7 @@
                 FORBIDDEN,
                 "Sharee cannot delete a shared group",)
             )
-
+    
     @inlineCallbacks
     def accessControlList(self, request, *a, **kw):
         """

Modified: CalendarServer/branches/users/gaya/sharedgroups-3/twistedcaldav/test/test_addressbookmultiget.py
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroups-3/twistedcaldav/test/test_addressbookmultiget.py	2013-05-13 19:59:27 UTC (rev 11173)
+++ CalendarServer/branches/users/gaya/sharedgroups-3/twistedcaldav/test/test_addressbookmultiget.py	2013-05-13 21:05:58 UTC (rev 11174)
@@ -195,7 +195,7 @@
     def addressbook_query(self, addressbook_uri, query, got_xml, data, no_init):
 
         if not no_init:
-            '''
+            ''' FIXME: clear address book, possibly by removing
             mkcol = """<?xml version="1.0" encoding="utf-8" ?>
 <D:mkcol xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:carddav">
 <D:set>

Modified: CalendarServer/branches/users/gaya/sharedgroups-3/twistedcaldav/test/test_addressbookquery.py
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroups-3/twistedcaldav/test/test_addressbookquery.py	2013-05-13 19:59:27 UTC (rev 11173)
+++ CalendarServer/branches/users/gaya/sharedgroups-3/twistedcaldav/test/test_addressbookquery.py	2013-05-13 21:05:58 UTC (rev 11174)
@@ -174,7 +174,7 @@
 
     @inlineCallbacks
     def addressbook_query(self, addressbook_uri, query, got_xml):
-        '''
+        ''' FIXME: clear address book, possibly by removing
         mkcol = """<?xml version="1.0" encoding="utf-8" ?>
 <D:mkcol xmlns:D="DAV:" xmlns:C="urn:ietf:params:xml:ns:carddav">
 <D:set>

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-13 19:59:27 UTC (rev 11173)
+++ CalendarServer/branches/users/gaya/sharedgroups-3/txdav/carddav/datastore/sql.py	2013-05-13 21:05:58 UTC (rev 11174)
@@ -398,11 +398,6 @@
         return ResourceType.addressbook  #@UndefinedVariable
 
 
-    #FIXME: Only used for shared group resouretype in SharedResourceMixin.upgradeToShare() and SharedResourceMixin.downgradeFromShare()
-    def objectResourcesHaveProperties(self):
-        return True
-
-
     ownerAddressBookHome = CommonHomeChild.ownerHome
     viewerAddressBookHome = CommonHomeChild.viewerHome
     addressbookObjects = CommonHomeChild.objectResources
@@ -1612,7 +1607,7 @@
                 yield self._changeAddressBookRevision(self.ownerHome().addressbook(), inserting)
 
         # TODO:  a better job here!
-        self._componentChanged = (self._component != component)
+        #self._componentChanged = (self._component != component)
         self._component = component
         returnValue(self._componentChanged)
 

Modified: CalendarServer/branches/users/gaya/sharedgroups-3/txdav/carddav/datastore/test/common.py
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroups-3/txdav/carddav/datastore/test/common.py	2013-05-13 19:59:27 UTC (rev 11173)
+++ CalendarServer/branches/users/gaya/sharedgroups-3/txdav/carddav/datastore/test/common.py	2013-05-13 21:05:58 UTC (rev 11174)
@@ -32,7 +32,7 @@
 from txdav.carddav.iaddressbookstore import IAddressBookObject, IAddressBookHome, \
     IAddressBook, IAddressBookTransaction
 from txdav.common.datastore.test.util import CommonCommonTests
-from txdav.common.icommondatastore import HomeChildNameAlreadyExistsError, InvalidUIDError
+from txdav.common.icommondatastore import InvalidUIDError
 from txdav.common.icommondatastore import ICommonTransaction
 from txdav.common.icommondatastore import InvalidObjectResourceError
 from txdav.common.icommondatastore import NoSuchHomeChildError

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-13 19:59:27 UTC (rev 11173)
+++ CalendarServer/branches/users/gaya/sharedgroups-3/txdav/common/datastore/sql.py	2013-05-13 21:05:58 UTC (rev 11174)
@@ -3145,10 +3145,17 @@
         if dataRows:
             # Get property stores
             childResourceIDs = [dataRow[2] for dataRow in dataRows]
-            propertyStores = yield PropertyStore.forMultipleResourcesWithResourceIDs(
-                home.uid(), home._txn, childResourceIDs
-            )
 
+            # FIXME: The following returns {} for twistedcaldav.test.test_sharing.SharingTests.test_noWikiAccess
+            # propertyStores = yield PropertyStore.forMultipleResourcesWithResourceIDs(
+            #    home.uid(), home._txn, childResourceIDs
+            #)
+            propertyStores = (yield PropertyStore.forMultipleResources(
+                home.uid(), home._txn,
+                cls._bindSchema.RESOURCE_ID, cls._bindSchema.HOME_RESOURCE_ID,
+                home._resourceID
+            ))
+
             # Get revisions
             revisions = (yield cls._revisionsForResourceIDs(childResourceIDs).on(home._txn, resourceIDs=childResourceIDs))
             revisions = dict(revisions)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130513/951b3f9c/attachment-0001.html>


More information about the calendarserver-changes mailing list