[CalendarServer-changes] [13713] CalendarServer/trunk/twistedcaldav
source_changes at macosforge.org
source_changes at macosforge.org
Tue Jul 1 17:58:58 PDT 2014
Revision: 13713
http://trac.calendarserver.org//changeset/13713
Author: cdaboo at apple.com
Date: 2014-07-01 17:58:58 -0700 (Tue, 01 Jul 2014)
Log Message:
-----------
CalDAV POSTs should have the owner of the outbox as the Originator.
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/resource.py
CalendarServer/trunk/twistedcaldav/scheduling_store/caldav/resource.py
Modified: CalendarServer/trunk/twistedcaldav/resource.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/resource.py 2014-07-01 21:13:50 UTC (rev 13712)
+++ CalendarServer/trunk/twistedcaldav/resource.py 2014-07-02 00:58:58 UTC (rev 13713)
@@ -886,7 +886,7 @@
@inlineCallbacks
def ownerPrincipal(self, request):
"""
- Return the DAV:owner property value (MUST be a DAV:href or None).
+ Return the principal resource for the owner of this resource.
"""
if hasattr(self, "_newStoreObject"):
if not hasattr(self._newStoreObject, "ownerHome"):
@@ -906,7 +906,7 @@
@inlineCallbacks
def resourceOwnerPrincipal(self, request):
"""
- This is the owner of the resource based on the URI used to access it. For a shared
+ This is the principal resource of the owner of the resource based on the URI used to access it. For a shared
collection it will be the sharee, otherwise it will be the regular the ownerPrincipal.
"""
parent = (yield self.locateParent(
Modified: CalendarServer/trunk/twistedcaldav/scheduling_store/caldav/resource.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/scheduling_store/caldav/resource.py 2014-07-01 21:13:50 UTC (rev 13712)
+++ CalendarServer/trunk/twistedcaldav/scheduling_store/caldav/resource.py 2014-07-02 00:58:58 UTC (rev 13713)
@@ -471,17 +471,13 @@
@inlineCallbacks
def loadOriginatorFromRequestDetails(self, request):
- # Get the originator who is the authenticated user
- originatorPrincipal = None
+ # The originator is the owner of the Outbox. We will have checked prior to this
+ # that the authenticated user has privileges to schedule as the owner.
originator = ""
- authz_principal = self.currentPrincipal(request).children[0]
- if isinstance(authz_principal, davxml.HRef):
- originatorPrincipalURL = str(authz_principal)
- if originatorPrincipalURL:
- originatorPrincipal = (yield request.locateResource(originatorPrincipalURL))
- if originatorPrincipal:
- # Pick the canonical CUA:
- originator = originatorPrincipal.canonicalCalendarUserAddress()
+ originatorPrincipal = (yield self.ownerPrincipal(request))
+ if originatorPrincipal:
+ # Pick the canonical CUA:
+ originator = originatorPrincipal.canonicalCalendarUserAddress()
if not originator:
self.log.error("%s request must have Originator" % (self.method,))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140701/af6f1ff2/attachment-0001.html>
More information about the calendarserver-changes
mailing list