<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[13735] CalendarServer/branches/users/gaya/groupsharee2</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.calendarserver.org//changeset/13735">13735</a></dd>
<dt>Author</dt> <dd>gaya@apple.com</dd>
<dt>Date</dt> <dd>2014-07-08 13:21:56 -0700 (Tue, 08 Jul 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>inviteUserToShare -&gt; inviteUIDToShare; uninviteUserFromShare -&gt; uninviteUIDFromShare</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#CalendarServerbranchesusersgayagroupsharee2calendarserverpushtesttest_notifierpy">CalendarServer/branches/users/gaya/groupsharee2/calendarserver/push/test/test_notifier.py</a></li>
<li><a href="#CalendarServerbranchesusersgayagroupsharee2twistedcaldavsharingpy">CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/sharing.py</a></li>
<li><a href="#CalendarServerbranchesusersgayagroupsharee2txdavcaldavdatastoresqlpy">CalendarServer/branches/users/gaya/groupsharee2/txdav/caldav/datastore/sql.py</a></li>
<li><a href="#CalendarServerbranchesusersgayagroupsharee2txdavcaldavdatastoretesttest_sql_externalpy">CalendarServer/branches/users/gaya/groupsharee2/txdav/caldav/datastore/test/test_sql_external.py</a></li>
<li><a href="#CalendarServerbranchesusersgayagroupsharee2txdavcaldavdatastoretesttest_sql_sharingpy">CalendarServer/branches/users/gaya/groupsharee2/txdav/caldav/datastore/test/test_sql_sharing.py</a></li>
<li><a href="#CalendarServerbranchesusersgayagroupsharee2txdavcarddavdatastoretesttest_sql_sharingpy">CalendarServer/branches/users/gaya/groupsharee2/txdav/carddav/datastore/test/test_sql_sharing.py</a></li>
<li><a href="#CalendarServerbranchesusersgayagroupsharee2txdavcommondatastorepoddingtesttest_conduitpy">CalendarServer/branches/users/gaya/groupsharee2/txdav/common/datastore/podding/test/test_conduit.py</a></li>
<li><a href="#CalendarServerbranchesusersgayagroupsharee2txdavcommondatastorepoddingtestutilpy">CalendarServer/branches/users/gaya/groupsharee2/txdav/common/datastore/podding/test/util.py</a></li>
<li><a href="#CalendarServerbranchesusersgayagroupsharee2txdavcommondatastoresqlpy">CalendarServer/branches/users/gaya/groupsharee2/txdav/common/datastore/sql.py</a></li>
<li><a href="#CalendarServerbranchesusersgayagroupsharee2txdavcommondatastoreworktesttest_revision_cleanuppy">CalendarServer/branches/users/gaya/groupsharee2/txdav/common/datastore/work/test/test_revision_cleanup.py</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="CalendarServerbranchesusersgayagroupsharee2calendarserverpushtesttest_notifierpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/gaya/groupsharee2/calendarserver/push/test/test_notifier.py (13734 => 13735)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/gaya/groupsharee2/calendarserver/push/test/test_notifier.py        2014-07-08 17:58:03 UTC (rev 13734)
+++ CalendarServer/branches/users/gaya/groupsharee2/calendarserver/push/test/test_notifier.py        2014-07-08 20:21:56 UTC (rev 13735)
</span><span class="lines">@@ -228,7 +228,7 @@
</span><span class="cx">     def test_shareWithNotifier(self):
</span><span class="cx"> 
</span><span class="cx">         calendar = yield self.calendarUnderTest(home=&quot;user01&quot;)
</span><del>-        yield calendar.inviteUserToShare(&quot;user02&quot;, _BIND_MODE_WRITE, &quot;&quot;)
</del><ins>+        yield calendar.inviteUIDToShare(&quot;user02&quot;, _BIND_MODE_WRITE, &quot;&quot;)
</ins><span class="cx">         self.assertEquals(
</span><span class="cx">             set(self.notifierFactory.history),
</span><span class="cx">             set([
</span><span class="lines">@@ -241,7 +241,7 @@
</span><span class="cx">         yield self.commit()
</span><span class="cx"> 
</span><span class="cx">         calendar = yield self.calendarUnderTest(home=&quot;user01&quot;)
</span><del>-        yield calendar.uninviteUserFromShare(&quot;user02&quot;)
</del><ins>+        yield calendar.uninviteUIDFromShare(&quot;user02&quot;)
</ins><span class="cx">         self.assertEquals(
</span><span class="cx">             set(self.notifierFactory.history),
</span><span class="cx">             set([
</span><span class="lines">@@ -258,7 +258,7 @@
</span><span class="cx">     def test_sharedCalendarNotifier(self):
</span><span class="cx"> 
</span><span class="cx">         calendar = yield self.calendarUnderTest(home=&quot;user01&quot;)
</span><del>-        shareeView = yield calendar.inviteUserToShare(&quot;user02&quot;, _BIND_MODE_WRITE, &quot;&quot;)
</del><ins>+        shareeView = yield calendar.inviteUIDToShare(&quot;user02&quot;, _BIND_MODE_WRITE, &quot;&quot;)
</ins><span class="cx">         yield shareeView.acceptShare(&quot;&quot;)
</span><span class="cx">         shareName = shareeView.name()
</span><span class="cx">         yield self.commit()
</span></span></pre></div>
<a id="CalendarServerbranchesusersgayagroupsharee2twistedcaldavsharingpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/sharing.py (13734 => 13735)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/sharing.py        2014-07-08 17:58:03 UTC (rev 13734)
+++ CalendarServer/branches/users/gaya/groupsharee2/twistedcaldav/sharing.py        2014-07-08 20:21:56 UTC (rev 13735)
</span><span class="lines">@@ -131,7 +131,7 @@
</span><span class="cx"> 
</span><span class="cx">         # Remove all invitees
</span><span class="cx">         for invitation in (yield self._newStoreObject.allInvitations()):
</span><del>-            yield self._newStoreObject.uninviteUserFromShare(invitation.shareeUID)
</del><ins>+            yield self._newStoreObject.uninviteUIDFromShare(invitation.shareeUID)
</ins><span class="cx"> 
</span><span class="cx">         returnValue(True)
</span><span class="cx"> 
</span><span class="lines">@@ -452,7 +452,7 @@
</span><span class="cx">         returnValue(adjusted_invitations)
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-    def inviteUserToShare(self, userid, cn, ace, summary, request):
</del><ins>+    def inviteUIDToShare(self, userid, cn, ace, summary, request):
</ins><span class="cx">         &quot;&quot;&quot; Send out in invite first, and then add this user to the share list
</span><span class="cx">             @param userid:
</span><span class="cx">             @param ace: Must be one of customxml.ReadWriteAccess or customxml.ReadAccess
</span><span class="lines">@@ -470,7 +470,7 @@
</span><span class="cx">         return self._processShareActionList(dl, resultIsList)
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-    def uninviteUserFromShare(self, userid, ace, request):
</del><ins>+    def uninviteUIDFromShare(self, userid, ace, request):
</ins><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         Send out in uninvite first, and then remove this user from the share list.
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="lines">@@ -516,7 +516,7 @@
</span><span class="cx">         if not sharee:
</span><span class="cx">             returnValue(False)
</span><span class="cx"> 
</span><del>-        result = (yield self._newStoreObject.inviteUserToShare(
</del><ins>+        result = (yield self._newStoreObject.inviteUIDToShare(
</ins><span class="cx">             sharee.principalUID(),
</span><span class="cx">             invitationBindModeFromXMLMap[type(ace)],
</span><span class="cx">             summary,
</span><span class="lines">@@ -539,7 +539,7 @@
</span><span class="cx">         else:
</span><span class="cx">             returnValue(False)
</span><span class="cx"> 
</span><del>-        result = (yield self._newStoreObject.uninviteUserFromShare(uid))
</del><ins>+        result = (yield self._newStoreObject.uninviteUIDFromShare(uid))
</ins><span class="cx"> 
</span><span class="cx">         returnValue(result)
</span><span class="cx"> 
</span><span class="lines">@@ -661,12 +661,12 @@
</span><span class="cx">                 del removeDict[u]
</span><span class="cx">                 del setDict[u]
</span><span class="cx">             for userid, access in removeDict.iteritems():
</span><del>-                result = (yield self.uninviteUserFromShare(userid, access, request))
</del><ins>+                result = (yield self.uninviteUIDFromShare(userid, access, request))
</ins><span class="cx">                 # If result is False that means the user being removed was not
</span><span class="cx">                 # actually invited, but let's not return an error in this case.
</span><span class="cx">                 okusers.add(userid)
</span><span class="cx">             for userid, (cn, access, summary) in setDict.iteritems():
</span><del>-                result = (yield self.inviteUserToShare(userid, cn, access, summary, request))
</del><ins>+                result = (yield self.inviteUIDToShare(userid, cn, access, summary, request))
</ins><span class="cx">                 (okusers if result else badusers).add(userid)
</span><span class="cx">             for userid, (cn, removeACL, newACL, summary) in updateinviteDict.iteritems():
</span><span class="cx">                 result = (yield self.inviteUserUpdateToShare(userid, cn, removeACL, newACL, summary, request))
</span></span></pre></div>
<a id="CalendarServerbranchesusersgayagroupsharee2txdavcaldavdatastoresqlpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/gaya/groupsharee2/txdav/caldav/datastore/sql.py (13734 => 13735)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/gaya/groupsharee2/txdav/caldav/datastore/sql.py        2014-07-08 17:58:03 UTC (rev 13734)
+++ CalendarServer/branches/users/gaya/groupsharee2/txdav/caldav/datastore/sql.py        2014-07-08 20:21:56 UTC (rev 13735)
</span><span class="lines">@@ -1993,7 +1993,7 @@
</span><span class="cx">     # Higher level API
</span><span class="cx">     #
</span><span class="cx">     @inlineCallbacks
</span><del>-    def inviteUserToShare(self, shareeUID, mode, summary, shareName=None):
</del><ins>+    def inviteUIDToShare(self, shareeUID, mode, summary, shareName=None):
</ins><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         Invite a user to share this collection - either create the share if it does not exist, or
</span><span class="cx">         update the existing share with new values. Make sure a notification is sent as well.
</span><span class="lines">@@ -2006,23 +2006,31 @@
</span><span class="cx">         @type summary: C{str}
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="cx"> 
</span><del>-        # Look for existing invite and update its fields or create new one
-        shareeView = yield self.shareeView(shareeUID)
-        if shareeView is not None:
-            status = _BIND_STATUS_INVITED if shareeView.shareStatus() in (_BIND_STATUS_DECLINED, _BIND_STATUS_INVALID) else None
-            yield self.updateShare(shareeView, mode=mode, status=status, summary=summary)
-        else:
-            shareeView = yield self.createShare(shareeUID=shareeUID, mode=mode, summary=summary, shareName=shareName)
</del><ins>+        record = yield self._txn.directoryService().recordWithUID(shareeUID.decode(&quot;utf-8&quot;))
+        if (
+            record is None or
+            record.type() != RecordType.group or not (False and
+                config.Sharing.Enabled and
+                config.Sharing.Calendars.Enabled and
+                config.Sharing.Calendars.Groups.Enabled
+            )
+        ):
+            returnValue(
+                (yield super(Calendar, self).inviteUIDToShare(shareeUID, mode, summary, shareName))
+            )
</ins><span class="cx"> 
</span><del>-        # Check for external
-        if shareeView.viewerHome().external():
-            yield self._sendExternalInvite(shareeView)
-        else:
-            # Send invite notification
-            yield self._sendInviteNotification(shareeView)
-        returnValue(shareeView)
</del><ins>+        # invite every member of group
+        groupID = (yield self._txn.groupByUID(record.uid))[0]
+        memberUIDs = yield self._txn.groupMemberUIDs(groupID)
+        for memberUID in memberUIDs:
+            shareeView = yield self.shareeView(shareeUID)
+            if shareeView is None:
+                yield super(Calendar, self).inviteUIDToShare(memberUID, _BIND_MODE_GROUP, summary, shareName)
+            # FIX ME:
</ins><span class="cx"> 
</span><ins>+        returnValue(None)
</ins><span class="cx"> 
</span><ins>+
</ins><span class="cx">     @inlineCallbacks
</span><span class="cx">     def directShareWithUser(self, shareeUID, shareName=None):
</span><span class="cx">         &quot;&quot;&quot;
</span><span class="lines">@@ -2050,7 +2058,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><del>-    def uninviteUserFromShare(self, shareeUID):
</del><ins>+    def uninviteUIDFromShare(self, shareeUID):
</ins><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         Remove a user from a share. Make sure a notification is sent as well.
</span><span class="cx"> 
</span></span></pre></div>
<a id="CalendarServerbranchesusersgayagroupsharee2txdavcaldavdatastoretesttest_sql_externalpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/gaya/groupsharee2/txdav/caldav/datastore/test/test_sql_external.py (13734 => 13735)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/gaya/groupsharee2/txdav/caldav/datastore/test/test_sql_external.py        2014-07-08 17:58:03 UTC (rev 13734)
+++ CalendarServer/branches/users/gaya/groupsharee2/txdav/caldav/datastore/test/test_sql_external.py        2014-07-08 20:21:56 UTC (rev 13735)
</span><span class="lines">@@ -108,7 +108,7 @@
</span><span class="cx">         self.assertEqual(len(invites), 0)
</span><span class="cx">         self.assertFalse(calendar.isShared())
</span><span class="cx"> 
</span><del>-        shareeView = yield calendar.inviteUserToShare(&quot;puser02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</del><ins>+        shareeView = yield calendar.inviteUIDToShare(&quot;puser02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</ins><span class="cx">         invites = yield calendar.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 1)
</span><span class="cx">         self.assertEqual(invites[0].uid, shareeView.shareUID())
</span><span class="lines">@@ -138,7 +138,7 @@
</span><span class="cx">         invites = yield calendar.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 1)
</span><span class="cx"> 
</span><del>-        yield calendar.uninviteUserFromShare(&quot;puser02&quot;)
</del><ins>+        yield calendar.uninviteUIDFromShare(&quot;puser02&quot;)
</ins><span class="cx">         invites = yield calendar.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 0)
</span><span class="cx"> 
</span><span class="lines">@@ -169,7 +169,7 @@
</span><span class="cx">         self.assertEqual(len(invites), 0)
</span><span class="cx">         self.assertFalse(calendar.isShared())
</span><span class="cx"> 
</span><del>-        shareeView = yield calendar.inviteUserToShare(&quot;puser02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</del><ins>+        shareeView = yield calendar.inviteUIDToShare(&quot;puser02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</ins><span class="cx">         invites = yield calendar.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 1)
</span><span class="cx"> 
</span><span class="lines">@@ -235,7 +235,7 @@
</span><span class="cx">         self.assertEqual(len(invites), 0)
</span><span class="cx">         self.assertFalse(calendar.isShared())
</span><span class="cx"> 
</span><del>-        shareeView = yield calendar.inviteUserToShare(&quot;puser02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</del><ins>+        shareeView = yield calendar.inviteUIDToShare(&quot;puser02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</ins><span class="cx">         invites = yield calendar.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 1)
</span><span class="cx"> 
</span><span class="lines">@@ -303,7 +303,7 @@
</span><span class="cx">         self.assertEqual(len(invites), 0)
</span><span class="cx">         self.assertFalse(calendar.isShared())
</span><span class="cx"> 
</span><del>-        shareeView = yield calendar.inviteUserToShare(&quot;puser02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</del><ins>+        shareeView = yield calendar.inviteUIDToShare(&quot;puser02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</ins><span class="cx">         invites = yield calendar.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 1)
</span><span class="cx">         inviteUID = shareeView.shareUID()
</span><span class="lines">@@ -370,7 +370,7 @@
</span><span class="cx">         invites = yield calendar.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 0)
</span><span class="cx"> 
</span><del>-        shareeView = yield calendar.inviteUserToShare(&quot;puser02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</del><ins>+        shareeView = yield calendar.inviteUIDToShare(&quot;puser02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</ins><span class="cx">         invites = yield calendar.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 1)
</span><span class="cx"> 
</span><span class="lines">@@ -598,7 +598,7 @@
</span><span class="cx">         invites = yield calendar.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 0)
</span><span class="cx"> 
</span><del>-        shareeView = yield calendar.inviteUserToShare(&quot;puser02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</del><ins>+        shareeView = yield calendar.inviteUIDToShare(&quot;puser02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</ins><span class="cx">         newCalName = shareeView.shareUID()
</span><span class="cx">         yield self.commit()
</span><span class="cx"> 
</span></span></pre></div>
<a id="CalendarServerbranchesusersgayagroupsharee2txdavcaldavdatastoretesttest_sql_sharingpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/gaya/groupsharee2/txdav/caldav/datastore/test/test_sql_sharing.py (13734 => 13735)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/gaya/groupsharee2/txdav/caldav/datastore/test/test_sql_sharing.py        2014-07-08 17:58:03 UTC (rev 13734)
+++ CalendarServer/branches/users/gaya/groupsharee2/txdav/caldav/datastore/test/test_sql_sharing.py        2014-07-08 20:21:56 UTC (rev 13735)
</span><span class="lines">@@ -100,7 +100,7 @@
</span><span class="cx">         invites = yield calendar.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 0)
</span><span class="cx"> 
</span><del>-        shareeView = yield calendar.inviteUserToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</del><ins>+        shareeView = yield calendar.inviteUIDToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</ins><span class="cx">         inviteUID = shareeView.shareUID()
</span><span class="cx">         yield self.commit()
</span><span class="cx"> 
</span><span class="lines">@@ -140,7 +140,7 @@
</span><span class="cx">         self.assertEqual(len(invites), 0)
</span><span class="cx">         self.assertFalse(calendar.isShared())
</span><span class="cx"> 
</span><del>-        shareeView = yield calendar.inviteUserToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</del><ins>+        shareeView = yield calendar.inviteUIDToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</ins><span class="cx">         invites = yield calendar.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 1)
</span><span class="cx">         self.assertEqual(invites[0].uid, shareeView.shareUID())
</span><span class="lines">@@ -168,7 +168,7 @@
</span><span class="cx">         invites = yield calendar.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 1)
</span><span class="cx"> 
</span><del>-        yield calendar.uninviteUserFromShare(&quot;user02&quot;)
</del><ins>+        yield calendar.uninviteUIDFromShare(&quot;user02&quot;)
</ins><span class="cx">         invites = yield calendar.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 0)
</span><span class="cx"> 
</span><span class="lines">@@ -198,7 +198,7 @@
</span><span class="cx">         self.assertEqual(len(invites), 0)
</span><span class="cx">         self.assertFalse(calendar.isShared())
</span><span class="cx"> 
</span><del>-        shareeView = yield calendar.inviteUserToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</del><ins>+        shareeView = yield calendar.inviteUIDToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</ins><span class="cx">         invites = yield calendar.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 1)
</span><span class="cx">         inviteUID = shareeView.shareUID()
</span><span class="lines">@@ -258,7 +258,7 @@
</span><span class="cx">         self.assertEqual(len(invites), 0)
</span><span class="cx">         self.assertFalse(calendar.isShared())
</span><span class="cx"> 
</span><del>-        shareeView = yield calendar.inviteUserToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</del><ins>+        shareeView = yield calendar.inviteUIDToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</ins><span class="cx">         invites = yield calendar.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 1)
</span><span class="cx">         inviteUID = shareeView.shareUID()
</span><span class="lines">@@ -319,7 +319,7 @@
</span><span class="cx">         self.assertEqual(len(invites), 0)
</span><span class="cx">         self.assertFalse(calendar.isShared())
</span><span class="cx"> 
</span><del>-        shareeView = yield calendar.inviteUserToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</del><ins>+        shareeView = yield calendar.inviteUIDToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</ins><span class="cx">         invites = yield calendar.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 1)
</span><span class="cx">         inviteUID = shareeView.shareUID()
</span><span class="lines">@@ -379,7 +379,7 @@
</span><span class="cx">         invites = yield calendar.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 0)
</span><span class="cx"> 
</span><del>-        shareeView = yield calendar.inviteUserToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</del><ins>+        shareeView = yield calendar.inviteUIDToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</ins><span class="cx">         invites = yield calendar.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 1)
</span><span class="cx">         inviteUID = shareeView.shareUID()
</span><span class="lines">@@ -609,7 +609,7 @@
</span><span class="cx">         invites = yield calendar.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 0)
</span><span class="cx"> 
</span><del>-        shareeView = yield calendar.inviteUserToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</del><ins>+        shareeView = yield calendar.inviteUIDToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</ins><span class="cx">         newCalName = shareeView.shareUID()
</span><span class="cx">         yield self.commit()
</span><span class="cx"> 
</span></span></pre></div>
<a id="CalendarServerbranchesusersgayagroupsharee2txdavcarddavdatastoretesttest_sql_sharingpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/gaya/groupsharee2/txdav/carddav/datastore/test/test_sql_sharing.py (13734 => 13735)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/gaya/groupsharee2/txdav/carddav/datastore/test/test_sql_sharing.py        2014-07-08 17:58:03 UTC (rev 13734)
+++ CalendarServer/branches/users/gaya/groupsharee2/txdav/carddav/datastore/test/test_sql_sharing.py        2014-07-08 20:21:56 UTC (rev 13735)
</span><span class="lines">@@ -150,7 +150,7 @@
</span><span class="cx">         invites = yield addressbook.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 0)
</span><span class="cx"> 
</span><del>-        shareeView = yield addressbook.inviteUserToShare(&quot;user02&quot;, mode, &quot;summary&quot;)
</del><ins>+        shareeView = yield addressbook.inviteUIDToShare(&quot;user02&quot;, mode, &quot;summary&quot;)
</ins><span class="cx">         inviteUID = shareeView.shareUID()
</span><span class="cx">         yield self.commit()
</span><span class="cx"> 
</span><span class="lines">@@ -179,7 +179,7 @@
</span><span class="cx">     def _inviteGroupShare(self, groupname=&quot;group1.vcf&quot;, mode=_BIND_MODE_READ):
</span><span class="cx">         # Invite
</span><span class="cx">         group = yield self.addressbookObjectUnderTest(home=&quot;user01&quot;, addressbook_name=&quot;addressbook&quot;, name=groupname)
</span><del>-        shareeView = yield group.inviteUserToShare(&quot;user02&quot;, mode, &quot;summary&quot;)
</del><ins>+        shareeView = yield group.inviteUIDToShare(&quot;user02&quot;, mode, &quot;summary&quot;)
</ins><span class="cx">         inviteUID = shareeView.shareUID()
</span><span class="cx">         yield self.commit()
</span><span class="cx"> 
</span><span class="lines">@@ -264,7 +264,7 @@
</span><span class="cx">         self.assertEqual(len(invites), 0)
</span><span class="cx">         self.assertFalse(addressbook.isShared())
</span><span class="cx"> 
</span><del>-        shareeView = yield addressbook.inviteUserToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</del><ins>+        shareeView = yield addressbook.inviteUIDToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</ins><span class="cx">         invites = yield addressbook.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 1)
</span><span class="cx">         self.assertEqual(invites[0].uid, shareeView.shareUID())
</span><span class="lines">@@ -291,7 +291,7 @@
</span><span class="cx">         self.assertEqual(len(invites), 1)
</span><span class="cx">         self.assertTrue(addressbook.isShared())
</span><span class="cx"> 
</span><del>-        yield addressbook.uninviteUserFromShare(&quot;user02&quot;)
</del><ins>+        yield addressbook.uninviteUIDFromShare(&quot;user02&quot;)
</ins><span class="cx">         invites = yield addressbook.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 0)
</span><span class="cx"> 
</span><span class="lines">@@ -317,7 +317,7 @@
</span><span class="cx">         self.assertEqual(len(invites), 0)
</span><span class="cx">         self.assertFalse(addressbook.isShared())
</span><span class="cx"> 
</span><del>-        shareeView = yield addressbook.inviteUserToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</del><ins>+        shareeView = yield addressbook.inviteUIDToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</ins><span class="cx">         invites = yield addressbook.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 1)
</span><span class="cx">         inviteUID = shareeView.shareUID()
</span><span class="lines">@@ -373,7 +373,7 @@
</span><span class="cx">         self.assertEqual(len(invites), 0)
</span><span class="cx">         self.assertFalse(addressbook.isShared())
</span><span class="cx"> 
</span><del>-        shareeView = yield addressbook.inviteUserToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</del><ins>+        shareeView = yield addressbook.inviteUIDToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</ins><span class="cx">         invites = yield addressbook.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 1)
</span><span class="cx">         inviteUID = shareeView.shareUID()
</span><span class="lines">@@ -427,7 +427,7 @@
</span><span class="cx">         invites = yield addressbook.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 0)
</span><span class="cx"> 
</span><del>-        shareeView = yield addressbook.inviteUserToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</del><ins>+        shareeView = yield addressbook.inviteUIDToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</ins><span class="cx">         invites = yield addressbook.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 1)
</span><span class="cx">         inviteUID = shareeView.shareUID()
</span><span class="lines">@@ -474,7 +474,7 @@
</span><span class="cx">         invites = yield addressbook.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 0)
</span><span class="cx"> 
</span><del>-        shareeView = yield addressbook.inviteUserToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</del><ins>+        shareeView = yield addressbook.inviteUIDToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</ins><span class="cx">         invites = yield addressbook.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 1)
</span><span class="cx">         inviteUID = shareeView.shareUID()
</span><span class="lines">@@ -595,7 +595,7 @@
</span><span class="cx">         self.assertEqual(len(invites), 0)
</span><span class="cx">         self.assertFalse(group.isShared())
</span><span class="cx"> 
</span><del>-        shareeView = yield group.inviteUserToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</del><ins>+        shareeView = yield group.inviteUIDToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</ins><span class="cx">         invites = yield group.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 1)
</span><span class="cx">         self.assertEqual(invites[0].uid, shareeView.shareUID())
</span><span class="lines">@@ -626,7 +626,7 @@
</span><span class="cx">         self.assertEqual(len(invites), 1)
</span><span class="cx">         self.assertTrue(group.isShared())
</span><span class="cx"> 
</span><del>-        yield group.uninviteUserFromShare(&quot;user02&quot;)
</del><ins>+        yield group.uninviteUIDFromShare(&quot;user02&quot;)
</ins><span class="cx">         invites = yield group.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 0)
</span><span class="cx">         self.assertTrue(group.isShared())
</span><span class="lines">@@ -651,7 +651,7 @@
</span><span class="cx">         self.assertEqual(len(invites), 0)
</span><span class="cx">         self.assertFalse(group.isShared())
</span><span class="cx"> 
</span><del>-        shareeView = yield group.inviteUserToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</del><ins>+        shareeView = yield group.inviteUIDToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</ins><span class="cx">         invites = yield group.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 1)
</span><span class="cx">         inviteUID = shareeView.shareUID()
</span><span class="lines">@@ -700,7 +700,7 @@
</span><span class="cx">         self.assertEqual(len(invites), 0)
</span><span class="cx">         self.assertFalse(group.isShared())
</span><span class="cx"> 
</span><del>-        shareeView = yield group.inviteUserToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</del><ins>+        shareeView = yield group.inviteUIDToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</ins><span class="cx">         invites = yield group.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 1)
</span><span class="cx">         inviteUID = shareeView.shareUID()
</span><span class="lines">@@ -754,7 +754,7 @@
</span><span class="cx">         self.assertEqual(len(invites), 0)
</span><span class="cx">         self.assertFalse(group.isShared())
</span><span class="cx"> 
</span><del>-        shareeView = yield group.inviteUserToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</del><ins>+        shareeView = yield group.inviteUIDToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</ins><span class="cx">         invites = yield group.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 1)
</span><span class="cx">         inviteUID = shareeView.shareUID()
</span><span class="lines">@@ -805,7 +805,7 @@
</span><span class="cx">         invites = yield group.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 0)
</span><span class="cx"> 
</span><del>-        shareeView = yield group.inviteUserToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</del><ins>+        shareeView = yield group.inviteUIDToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</ins><span class="cx">         invites = yield group.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 1)
</span><span class="cx">         inviteUID = shareeView.shareUID()
</span><span class="lines">@@ -867,7 +867,7 @@
</span><span class="cx"> 
</span><span class="cx">         # Uninvite one
</span><span class="cx">         group = yield self.addressbookObjectUnderTest(home=&quot;user01&quot;, addressbook_name=&quot;addressbook&quot;, name=&quot;group1.vcf&quot;)
</span><del>-        yield group.uninviteUserFromShare(&quot;user02&quot;)
</del><ins>+        yield group.uninviteUIDFromShare(&quot;user02&quot;)
</ins><span class="cx">         invites = yield group.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 0)
</span><span class="cx"> 
</span><span class="lines">@@ -882,7 +882,7 @@
</span><span class="cx"> 
</span><span class="cx">         # Uninvite other
</span><span class="cx">         group = yield self.addressbookObjectUnderTest(home=&quot;user02&quot;, addressbook_name=&quot;user01&quot;, name=&quot;group2.vcf&quot;)
</span><del>-        yield group.uninviteUserFromShare(&quot;user02&quot;)
</del><ins>+        yield group.uninviteUIDFromShare(&quot;user02&quot;)
</ins><span class="cx">         invites = yield group.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 0)
</span><span class="cx"> 
</span><span class="lines">@@ -1002,7 +1002,7 @@
</span><span class="cx"> 
</span><span class="cx">         # Uninvite group1
</span><span class="cx">         group = yield self.addressbookObjectUnderTest(home=&quot;user01&quot;, addressbook_name=&quot;addressbook&quot;, name=&quot;group1.vcf&quot;)
</span><del>-        yield group.uninviteUserFromShare(&quot;user02&quot;)
</del><ins>+        yield group.uninviteUIDFromShare(&quot;user02&quot;)
</ins><span class="cx"> 
</span><span class="cx">         yield self._check_addressbook(&quot;user02&quot;, &quot;user01&quot;, self.fully_shared_children)
</span><span class="cx">         yield self._check_read_only(&quot;user02&quot;, &quot;user01&quot;, [&quot;group1.vcf&quot;, &quot;card2.vcf&quot;, ])
</span><span class="lines">@@ -1010,7 +1010,7 @@
</span><span class="cx"> 
</span><span class="cx">         # Uninvite group2
</span><span class="cx">         group = yield self.addressbookObjectUnderTest(home=&quot;user01&quot;, addressbook_name=&quot;addressbook&quot;, name=&quot;group2.vcf&quot;)
</span><del>-        yield group.uninviteUserFromShare(&quot;user02&quot;)
</del><ins>+        yield group.uninviteUIDFromShare(&quot;user02&quot;)
</ins><span class="cx"> 
</span><span class="cx">         yield self._check_addressbook(&quot;user02&quot;, &quot;user01&quot;, self.fully_shared_children)
</span><span class="cx">         yield self._check_read_only(&quot;user02&quot;, &quot;user01&quot;, self.all_children)
</span><span class="lines">@@ -1029,7 +1029,7 @@
</span><span class="cx"> 
</span><span class="cx">         # Add group1 read-write - but do not accept
</span><span class="cx">         group = yield self.addressbookObjectUnderTest(home=&quot;user01&quot;, addressbook_name=&quot;addressbook&quot;, name=&quot;group1.vcf&quot;)
</span><del>-        invited = yield group.inviteUserToShare(&quot;user02&quot;, _BIND_MODE_WRITE, &quot;summary&quot;)
</del><ins>+        invited = yield group.inviteUIDToShare(&quot;user02&quot;, _BIND_MODE_WRITE, &quot;summary&quot;)
</ins><span class="cx">         yield self._check_notifications(&quot;user02&quot;, [shareeName, invited.shareUID(), ])
</span><span class="cx"> 
</span><span class="cx">         yield self._check_addressbook(&quot;user02&quot;, &quot;user01&quot;, self.fully_shared_children)
</span></span></pre></div>
<a id="CalendarServerbranchesusersgayagroupsharee2txdavcommondatastorepoddingtesttest_conduitpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/gaya/groupsharee2/txdav/common/datastore/podding/test/test_conduit.py (13734 => 13735)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/gaya/groupsharee2/txdav/common/datastore/podding/test/test_conduit.py        2014-07-08 17:58:03 UTC (rev 13734)
+++ CalendarServer/branches/users/gaya/groupsharee2/txdav/common/datastore/podding/test/test_conduit.py        2014-07-08 20:21:56 UTC (rev 13735)
</span><span class="lines">@@ -284,7 +284,7 @@
</span><span class="cx">         yield self.otherCommit()
</span><span class="cx"> 
</span><span class="cx">         calendar1 = yield self.calendarUnderTest(home=&quot;user01&quot;, name=&quot;calendar&quot;)
</span><del>-        yield calendar1.uninviteUserFromShare(&quot;puser01&quot;)
</del><ins>+        yield calendar1.uninviteUIDFromShare(&quot;puser01&quot;)
</ins><span class="cx">         yield self.commit()
</span><span class="cx"> 
</span><span class="cx">         shared = yield self.calendarUnderTest(txn=self.newOtherTransaction(), home=&quot;puser01&quot;, name=&quot;shared-calendar&quot;)
</span></span></pre></div>
<a id="CalendarServerbranchesusersgayagroupsharee2txdavcommondatastorepoddingtestutilpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/gaya/groupsharee2/txdav/common/datastore/podding/test/util.py (13734 => 13735)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/gaya/groupsharee2/txdav/common/datastore/podding/test/util.py        2014-07-08 17:58:03 UTC (rev 13734)
+++ CalendarServer/branches/users/gaya/groupsharee2/txdav/common/datastore/podding/test/util.py        2014-07-08 20:21:56 UTC (rev 13735)
</span><span class="lines">@@ -193,7 +193,7 @@
</span><span class="cx"> 
</span><span class="cx">         home = yield self.homeUnderTest(name=ownerGUID, create=True)
</span><span class="cx">         calendar = yield home.calendarWithName(name)
</span><del>-        yield calendar.inviteUserToShare(shareeGUID, _BIND_MODE_WRITE, &quot;shared&quot;, shareName=&quot;shared-calendar&quot;)
</del><ins>+        yield calendar.inviteUIDToShare(shareeGUID, _BIND_MODE_WRITE, &quot;shared&quot;, shareName=&quot;shared-calendar&quot;)
</ins><span class="cx">         yield self.commit()
</span><span class="cx"> 
</span><span class="cx">         # ACK: home2 is None
</span><span class="lines">@@ -209,5 +209,5 @@
</span><span class="cx"> 
</span><span class="cx">         home = yield self.homeUnderTest(name=ownerGUID)
</span><span class="cx">         calendar = yield home.calendarWithName(name)
</span><del>-        yield calendar.uninviteUserFromShare(shareeGUID)
</del><ins>+        yield calendar.uninviteUIDFromShare(shareeGUID)
</ins><span class="cx">         yield self.commit()
</span></span></pre></div>
<a id="CalendarServerbranchesusersgayagroupsharee2txdavcommondatastoresqlpy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/gaya/groupsharee2/txdav/common/datastore/sql.py (13734 => 13735)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/gaya/groupsharee2/txdav/common/datastore/sql.py        2014-07-08 17:58:03 UTC (rev 13734)
+++ CalendarServer/branches/users/gaya/groupsharee2/txdav/common/datastore/sql.py        2014-07-08 20:21:56 UTC (rev 13735)
</span><span class="lines">@@ -2901,7 +2901,7 @@
</span><span class="cx">                 self.uid(), shareName=shareUID
</span><span class="cx">             )
</span><span class="cx">         else:
</span><del>-            shareeView = yield ownerView.inviteUserToShare(
</del><ins>+            shareeView = yield ownerView.inviteUIDToShare(
</ins><span class="cx">                 self.uid(), bindMode, summary, shareName=shareUID
</span><span class="cx">             )
</span><span class="cx"> 
</span><span class="lines">@@ -2925,7 +2925,7 @@
</span><span class="cx">             raise ExternalShareFailed(&quot;Invalid share ID: {}&quot;.format(shareUID))
</span><span class="cx"> 
</span><span class="cx">         # Now carry out the share operation
</span><del>-        yield ownerView.uninviteUserFromShare(self.uid())
</del><ins>+        yield ownerView.uninviteUIDFromShare(self.uid())
</ins><span class="cx"> 
</span><span class="cx">         # See if there are any references to the external share. If not,
</span><span class="cx">         # remove it
</span><span class="lines">@@ -4563,7 +4563,7 @@
</span><span class="cx">     # Higher level API
</span><span class="cx">     #
</span><span class="cx">     @inlineCallbacks
</span><del>-    def inviteUserToShare(self, shareeUID, mode, summary, shareName=None):
</del><ins>+    def inviteUIDToShare(self, shareeUID, mode, summary, shareName=None):
</ins><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         Invite a user to share this collection - either create the share if it does not exist, or
</span><span class="cx">         update the existing share with new values. Make sure a notification is sent as well.
</span><span class="lines">@@ -4620,7 +4620,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     @inlineCallbacks
</span><del>-    def uninviteUserFromShare(self, shareeUID):
</del><ins>+    def uninviteUIDFromShare(self, shareeUID):
</ins><span class="cx">         &quot;&quot;&quot;
</span><span class="cx">         Remove a user from a share. Make sure a notification is sent as well.
</span><span class="cx"> 
</span><span class="lines">@@ -4703,7 +4703,7 @@
</span><span class="cx"> 
</span><span class="cx">         # Remove all sharees (direct and invited)
</span><span class="cx">         for invitation in (yield self.sharingInvites()):
</span><del>-            yield self.uninviteUserFromShare(invitation.shareeUID)
</del><ins>+            yield self.uninviteUIDFromShare(invitation.shareeUID)
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">     def newShare(self, displayname=None):
</span></span></pre></div>
<a id="CalendarServerbranchesusersgayagroupsharee2txdavcommondatastoreworktesttest_revision_cleanuppy"></a>
<div class="modfile"><h4>Modified: CalendarServer/branches/users/gaya/groupsharee2/txdav/common/datastore/work/test/test_revision_cleanup.py (13734 => 13735)</h4>
<pre class="diff"><span>
<span class="info">--- CalendarServer/branches/users/gaya/groupsharee2/txdav/common/datastore/work/test/test_revision_cleanup.py        2014-07-08 17:58:03 UTC (rev 13734)
+++ CalendarServer/branches/users/gaya/groupsharee2/txdav/common/datastore/work/test/test_revision_cleanup.py        2014-07-08 20:21:56 UTC (rev 13735)
</span><span class="lines">@@ -223,7 +223,7 @@
</span><span class="cx">         invites = yield calendar.sharingInvites()
</span><span class="cx">         self.assertEqual(len(invites), 0)
</span><span class="cx"> 
</span><del>-        shareeView = yield calendar.inviteUserToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</del><ins>+        shareeView = yield calendar.inviteUIDToShare(&quot;user02&quot;, _BIND_MODE_READ, &quot;summary&quot;)
</ins><span class="cx">         inviteUID = shareeView.shareUID()
</span><span class="cx">         yield self.commit()
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>