From ad0eeaaf1c9adfdb7875ea2e18ad11470228e284 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 15 Aug 2016 17:53:58 +0200 Subject: [PATCH] use AllowedSharingModes for can-be-published & can-be-shared --- apps/dav/lib/CalDAV/Publishing/PublishPlugin.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php b/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php index 1b89578e3c..79dc84b148 100644 --- a/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php +++ b/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php @@ -9,6 +9,7 @@ use Sabre\DAV\ServerPlugin; use Sabre\DAV\Exception\NotFound; use Sabre\HTTP\RequestInterface; use Sabre\HTTP\ResponseInterface; +use Sabre\CalDAV\Xml\Property\AllowedSharingModes; use OCA\DAV\CalDAV\Publishing\Xml\Publisher; use OCA\DAV\CalDAV\Calendar; use OCP\IURLGenerator; @@ -109,8 +110,8 @@ class PublishPlugin extends ServerPlugin { return new Publisher($publishUrl, false); }); - $propFind->handle('{'.self::NS_CALENDARSERVER.'}can-be-published', function() use ($node) { - return !$node->getPublishStatus() && !$node->isSubscription(); + $propFind->handle('{'.self::NS_CALENDARSERVER.'}allowed-sharing-modes', function() use ($node) { + return new AllowedSharingModes(!$node->isSubscription(), !$node->isSubscription()); }); } }