[CalendarServer-changes] [9202] CalendarServer/branches/users/glyph/sharing-api
source_changes at macosforge.org
source_changes at macosforge.org
Thu Apr 26 17:09:11 PDT 2012
Revision: 9202
http://trac.macosforge.org/projects/calendarserver/changeset/9202
Author: glyph at apple.com
Date: 2012-04-26 17:09:11 -0700 (Thu, 26 Apr 2012)
Log Message:
-----------
Store DisplayName name property for sharee.
Modified Paths:
--------------
CalendarServer/branches/users/glyph/sharing-api/txdav/common/datastore/sql.py
Property Changed:
----------------
CalendarServer/branches/users/glyph/sharing-api/
Modified: CalendarServer/branches/users/glyph/sharing-api/txdav/common/datastore/sql.py
===================================================================
--- CalendarServer/branches/users/glyph/sharing-api/txdav/common/datastore/sql.py 2012-04-27 00:09:08 UTC (rev 9201)
+++ CalendarServer/branches/users/glyph/sharing-api/txdav/common/datastore/sql.py 2012-04-27 00:09:11 UTC (rev 9202)
@@ -83,6 +83,7 @@
from twistedcaldav.customxml import NotificationType
from twistedcaldav.dateops import datetimeMktime, parseSQLTimestamp,\
pyCalendarTodatetime
+from txdav.xml.rfc2518 import DisplayName
from cStringIO import StringIO
from sqlparse import parse
@@ -1972,6 +1973,9 @@
@return: the name of the shared calendar in the new calendar home.
"""
shareeHome = yield self._txn.calendarHomeWithUID(homeUID)
+ dn = PropertyName.fromElement(DisplayName)
+ dnprop = (self.properties().get(dn) or
+ DisplayName.fromString(self.name()))
# FIXME: honor current home type
newName = str(uuid4())
yield self._bindInsertQuery.on(
@@ -1981,10 +1985,13 @@
bindStatus=_BIND_STATUS_ACCEPTED,
)
yield self._insertInviteQuery.on(
- self._txn, uid=newName, name=newName,
+ self._txn, uid=newName, name=str(dnprop),
homeID=shareeHome._resourceID, resourceID=self._resourceID,
recipient=homeUID
)
+ shareeProps = yield PropertyStore.load(homeUID, self._txn,
+ self._resourceID)
+ shareeProps[dn] = dnprop
returnValue(newName)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120426/33222727/attachment-0001.html>
More information about the calendarserver-changes
mailing list