[Pkg-owncloud-commits] [php-sabredav] 87/275: wip.

David Prévot taffit at moszumanska.debian.org
Thu Sep 25 14:55:55 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository php-sabredav.

commit 59d81a64fb245203c57a75045bce8a922de4de79
Author: Evert Pot <me at evertpot.com>
Date:   Sun Jul 6 22:18:02 2014 -0400

    wip.
---
 lib/CalDAV/Schedule/Plugin.php | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/lib/CalDAV/Schedule/Plugin.php b/lib/CalDAV/Schedule/Plugin.php
index afda459..d0b458e 100644
--- a/lib/CalDAV/Schedule/Plugin.php
+++ b/lib/CalDAV/Schedule/Plugin.php
@@ -530,11 +530,11 @@ class Plugin extends ServerPlugin {
         }
 
         if (!isset($result[0][200][$caldavNS . 'schedule-inbox-URL'])) {
-            $iTipMessage->scheduleStatus = '3.7; Could not find local inbox';
+            $iTipMessage->scheduleStatus = '5.2; Could not find local inbox';
             return;
         }
         if (!isset($result[0][200][$caldavNS . 'schedule-default-calendar-URL'])) {
-            $iTipMessage->scheduleStatus = '3.7; Could not find a schedule-default-calendar-URL property';
+            $iTipMessage->scheduleStatus = '5.2; Could not find a schedule-default-calendar-URL property';
             return;
         }
 
@@ -544,14 +544,18 @@ class Plugin extends ServerPlugin {
         // Note that we are bypassing ACL on purpose by calling this directly.
         // We may need to look a bit deeper into this later. Supporting ACL
         // here would be nice.
-        $inbox = $this->server->tree->getNodeForPath($inboxPath);
-        $calendar = $this->server->tree->getNodeForPath($calendarPath);
+        if (!$acl->checkPrivileges($inboxPath, '{' . self::NS_CALDAV . '}schedule-deliver-invite', DAVACL\Plugin::R_PARENT, false)) {
+            $iTipMessage->scheduleStatus = '3.8; organizer did not have the schedule-deliver-invite privilege on the attendees inbox';
+            return;
+        }
 
-        $objectPath = 'sabredav-' . \Sabre\DAV\UUIDUtil::getUUID() . '.ics';
+        // Next, we're going to find out if the item already exits in one of
+        // the users' calendars.
 
-        $inbox->createFile($objectPath, $iTipMessage->message->serialize());
-        $calendar->createFile($objectPath, $iTipMessage->message->serialize());
+        $inbox = $this->server->tree->getNodeForPath($inboxPath);
+        $calendar = $this->server->tree->getNodeForPath($calendarPath);
 
+        $inbox->deliverInvite($itipMessage);
         $iTipMessage->scheduleStatus = '1.2;Message delivered locally';
 
     }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabredav.git



More information about the Pkg-owncloud-commits mailing list