From 520724d757af0645fd9847f8d1606d7341942fc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Thu, 17 Mar 2016 18:00:06 +0100 Subject: [PATCH] Necessary code changes to make browser plugin properly work --- apps/dav/lib/carddav/plugin.php | 4 ++++ apps/dav/lib/connector/sabre/davaclplugin.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/dav/lib/carddav/plugin.php b/apps/dav/lib/carddav/plugin.php index d94dce1db0..e02cc5686b 100644 --- a/apps/dav/lib/carddav/plugin.php +++ b/apps/dav/lib/carddav/plugin.php @@ -46,6 +46,10 @@ class Plugin extends \Sabre\CardDAV\Plugin { list(, $principalId) = URLUtil::splitPath($principal); return self::ADDRESSBOOK_ROOT . '/users/' . $principalId; } + if (strrpos($principal, 'principals/groups', -strlen($principal)) !== false) { + list(, $principalId) = URLUtil::splitPath($principal); + return self::ADDRESSBOOK_ROOT . '/groups/' . $principalId; + } if (strrpos($principal, 'principals/system', -strlen($principal)) !== false) { list(, $principalId) = URLUtil::splitPath($principal); return self::ADDRESSBOOK_ROOT . '/system/' . $principalId; diff --git a/apps/dav/lib/connector/sabre/davaclplugin.php b/apps/dav/lib/connector/sabre/davaclplugin.php index 4a9dd66161..f5699b469c 100644 --- a/apps/dav/lib/connector/sabre/davaclplugin.php +++ b/apps/dav/lib/connector/sabre/davaclplugin.php @@ -46,7 +46,7 @@ class DavAclPlugin extends \Sabre\DAVACL\Plugin { function checkPrivileges($uri, $privileges, $recursion = self::R_PARENT, $throwExceptions = true) { $access = parent::checkPrivileges($uri, $privileges, $recursion, false); - if($access === false) { + if($access === false && $throwExceptions) { /** @var INode $node */ $node = $this->server->tree->getNodeForPath($uri);