[CalendarServer-changes] [13999] CalendarServer/branches/release/CalendarServer-6.0-dev/txdav
source_changes at macosforge.org
source_changes at macosforge.org
Tue Sep 23 12:49:35 PDT 2014
Revision: 13999
http://trac.calendarserver.org//changeset/13999
Author: cdaboo at apple.com
Date: 2014-09-23 12:49:35 -0700 (Tue, 23 Sep 2014)
Log Message:
-----------
Trying to unshare with the owner of a shared calendar now fails properly.
Modified Paths:
--------------
CalendarServer/branches/release/CalendarServer-6.0-dev/txdav/carddav/datastore/test/test_sql.py
CalendarServer/branches/release/CalendarServer-6.0-dev/txdav/common/datastore/sql.py
Modified: CalendarServer/branches/release/CalendarServer-6.0-dev/txdav/carddav/datastore/test/test_sql.py
===================================================================
--- CalendarServer/branches/release/CalendarServer-6.0-dev/txdav/carddav/datastore/test/test_sql.py 2014-09-23 19:23:27 UTC (rev 13998)
+++ CalendarServer/branches/release/CalendarServer-6.0-dev/txdav/carddav/datastore/test/test_sql.py 2014-09-23 19:49:35 UTC (rev 13999)
@@ -763,7 +763,7 @@
@inlineCallbacks
def _defer2():
- yield ab2.directShareWithUser("uid1")
+ yield ab2.directShareWithUser("uid2")
yield txn2.commit()
d2 = _defer2()
Modified: CalendarServer/branches/release/CalendarServer-6.0-dev/txdav/common/datastore/sql.py
===================================================================
--- CalendarServer/branches/release/CalendarServer-6.0-dev/txdav/common/datastore/sql.py 2014-09-23 19:23:27 UTC (rev 13998)
+++ CalendarServer/branches/release/CalendarServer-6.0-dev/txdav/common/datastore/sql.py 2014-09-23 19:49:35 UTC (rev 13999)
@@ -4889,6 +4889,10 @@
the per-user properties for the sharee.
"""
+ # Never return the owner's own resource
+ if self._home.uid() == shareeUID:
+ returnValue(None)
+
# Get the child of the sharee home that has the same resource id as the owned one
shareeHome = yield self._txn.homeWithUID(self._home._homeType, shareeUID, authzUID=shareeUID)
shareeView = (yield shareeHome.allChildWithID(self.id())) if shareeHome is not None else None
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140923/bd53844a/attachment.html>
More information about the calendarserver-changes
mailing list