[CalendarServer-changes] [13998] CalendarServer/trunk/txdav
source_changes at macosforge.org
source_changes at macosforge.org
Tue Sep 23 12:23:27 PDT 2014
Revision: 13998
http://trac.calendarserver.org//changeset/13998
Author: cdaboo at apple.com
Date: 2014-09-23 12:23:27 -0700 (Tue, 23 Sep 2014)
Log Message:
-----------
Trying to unshare with the owner of a shared calendar now fails properly.
Modified Paths:
--------------
CalendarServer/trunk/txdav/carddav/datastore/test/test_sql.py
CalendarServer/trunk/txdav/common/datastore/sql.py
Modified: CalendarServer/trunk/txdav/carddav/datastore/test/test_sql.py
===================================================================
--- CalendarServer/trunk/txdav/carddav/datastore/test/test_sql.py 2014-09-23 19:22:09 UTC (rev 13997)
+++ CalendarServer/trunk/txdav/carddav/datastore/test/test_sql.py 2014-09-23 19:23:27 UTC (rev 13998)
@@ -763,7 +763,7 @@
@inlineCallbacks
def _defer2():
- yield ab2.directShareWithUser("uid1")
+ yield ab2.directShareWithUser("uid2")
yield txn2.commit()
d2 = _defer2()
Modified: CalendarServer/trunk/txdav/common/datastore/sql.py
===================================================================
--- CalendarServer/trunk/txdav/common/datastore/sql.py 2014-09-23 19:22:09 UTC (rev 13997)
+++ CalendarServer/trunk/txdav/common/datastore/sql.py 2014-09-23 19:23:27 UTC (rev 13998)
@@ -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/22aa69dd/attachment.html>
More information about the calendarserver-changes
mailing list