[CalendarServer-changes] [5491] CalendarServer/trunk/twistedcaldav/sharing.py

source_changes at macosforge.org source_changes at macosforge.org
Mon Apr 19 16:15:14 PDT 2010


Revision: 5491
          http://trac.macosforge.org/projects/calendarserver/changeset/5491
Author:   cdaboo at apple.com
Date:     2010-04-19 16:15:13 -0700 (Mon, 19 Apr 2010)
Log Message:
-----------
Set displayname of shared calendar on invite accept.

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/sharing.py

Modified: CalendarServer/trunk/twistedcaldav/sharing.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/sharing.py	2010-04-19 23:13:50 UTC (rev 5490)
+++ CalendarServer/trunk/twistedcaldav/sharing.py	2010-04-19 23:15:13 UTC (rev 5491)
@@ -809,6 +809,13 @@
             oldShare = share = SharedCalendarRecord(inviteUID, hostUrl, str(uuid4()), displayname)
             self.sharesDB().addOrUpdateRecord(share)
         
+        # Set per-user displayname to whatever was given
+        if displayname:
+            sharedCalendar = (yield request.locateResource(hostUrl))
+            ownerPrincipal = (yield self.ownerPrincipal(request))
+            sharedCalendar.setVirtualShare(ownerPrincipal, oldShare)
+            yield sharedCalendar.writeProperty(davxml.DisplayName.fromString(displayname), request)
+ 
         # Return the URL of the shared calendar
         returnValue(XMLResponse(
             code = responsecode.OK,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100419/909c5e7d/attachment-0001.html>


More information about the calendarserver-changes mailing list