[CalendarServer-changes] [13035] CalendarServer/branches/users/sagen/move2who-4/twistedcaldav/ storebridge.py

source_changes at macosforge.org source_changes at macosforge.org
Fri Mar 28 14:42:29 PDT 2014


Revision: 13035
          http://trac.calendarserver.org//changeset/13035
Author:   sagen at apple.com
Date:     2014-03-28 14:42:29 -0700 (Fri, 28 Mar 2014)
Log Message:
-----------
Sprinkle in some yields, comment out first/last name

Modified Paths:
--------------
    CalendarServer/branches/users/sagen/move2who-4/twistedcaldav/storebridge.py

Modified: CalendarServer/branches/users/sagen/move2who-4/twistedcaldav/storebridge.py
===================================================================
--- CalendarServer/branches/users/sagen/move2who-4/twistedcaldav/storebridge.py	2014-03-28 21:41:57 UTC (rev 13034)
+++ CalendarServer/branches/users/sagen/move2who-4/twistedcaldav/storebridge.py	2014-03-28 21:42:29 UTC (rev 13035)
@@ -1613,7 +1613,7 @@
         cuas = (yield self._newStoreCalendarObject.component()).getAttendees()
         newACEs = []
         for calendarUserAddress in cuas:
-            principal = self.principalForCalendarUserAddress(
+            principal = yield self.principalForCalendarUserAddress(
                 calendarUserAddress
             )
             if principal is None:
@@ -1683,7 +1683,7 @@
             proxyprivs = list(userprivs)
             proxyprivs.remove(davxml.Privilege(davxml.ReadACL()))
 
-            principal = self.principalForUID(invite.shareeUID)
+            principal = yield self.principalForUID(invite.shareeUID)
             aces += (
                 # Inheritable specific access for the resource's associated principal.
                 davxml.ACE(
@@ -1941,7 +1941,7 @@
         cuas = (yield self._newStoreCalendarObject.component()).getAttendees()
         newACEs = []
         for calendarUserAddress in cuas:
-            principal = self.principalForCalendarUserAddress(
+            principal = yield self.principalForCalendarUserAddress(
                 calendarUserAddress
             )
             if principal is None:
@@ -2038,7 +2038,7 @@
             if access in ("read-only", "read-write",):
                 userprivs.extend(privileges)
 
-            principal = self.principalForUID(invite.shareeUID)
+            principal = yield self.principalForUID(invite.shareeUID)
             aces += (
                 # Inheritable specific access for the resource's associated principal.
                 davxml.ACE(
@@ -3707,7 +3707,7 @@
         else:
             userprivs.append(davxml.Privilege(davxml.WriteProperties()))
 
-        sharee = self.principalForUID(self._newStoreObject.viewerHome().uid())
+        sharee = yield self.principalForUID(self._newStoreObject.viewerHome().uid())
         aces = (
             # Inheritable specific access for the resource's associated principal.
             davxml.ACE(
@@ -3909,7 +3909,7 @@
         assert ignored is None, "This is a notification object, not a notification"
         jsondata = (yield self._newStoreObject.notificationData())
         if jsondata["notification-type"] == "invite-notification":
-            ownerPrincipal = self.principalForUID(jsondata["owner"])
+            ownerPrincipal = yield self.principalForUID(jsondata["owner"])
             ownerCN = ownerPrincipal.displayName()
             ownerHomeURL = ownerPrincipal.calendarHomeURLs()[0] if jsondata["shared-type"] == "calendar" else ownerPrincipal.addressBookHomeURLs()[0]
 
@@ -3919,7 +3919,7 @@
             else:
                 owner = "urn:uuid:" + ownerPrincipal.principalUID()
 
-            shareePrincipal = self.principalForUID(jsondata["sharee"])
+            shareePrincipal = yield self.principalForUID(jsondata["sharee"])
 
             if "supported-components" in jsondata:
                 comps = jsondata["supported-components"]
@@ -3954,10 +3954,10 @@
                 ),
             )
         elif jsondata["notification-type"] == "invite-reply":
-            ownerPrincipal = self.principalForUID(jsondata["owner"])
+            ownerPrincipal = yield self.principalForUID(jsondata["owner"])
             ownerHomeURL = ownerPrincipal.calendarHomeURLs()[0] if jsondata["shared-type"] == "calendar" else ownerPrincipal.addressBookHomeURLs()[0]
 
-            shareePrincipal = self.principalForUID(jsondata["sharee"])
+            shareePrincipal = yield self.principalForUID(jsondata["sharee"])
 
             # FIXME:  use urn:uuid always?
             if jsondata["shared-type"] == "calendar":
@@ -3985,8 +3985,8 @@
                     customxml.InReplyTo.fromString(jsondata["in-reply-to"]),
                     customxml.InviteSummary.fromString(jsondata["summary"]) if jsondata["summary"] else None,
                     customxml.CommonName.fromString(commonName) if commonName else None,
-                    customxml.FirstNameProperty(record.firstName) if record.firstName else None,
-                    customxml.LastNameProperty(record.lastName) if record.lastName else None,
+                    # customxml.FirstNameProperty(record.firstName) if record.firstName else None,
+                    # customxml.LastNameProperty(record.lastName) if record.lastName else None,
                     #**typeAttr
                 ),
             )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140328/e084a170/attachment.html>


More information about the calendarserver-changes mailing list