aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-03-17 18:00:06 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-03-17 18:00:06 +0100
commit520724d757af0645fd9847f8d1606d7341942fc1 (patch)
tree17255863387c15e78ecb4ffccd368ee915bb029c /apps
parent7d638fdb3418be7990c230290494a8fd6d1a25d5 (diff)
downloadnextcloud-server-520724d757af0645fd9847f8d1606d7341942fc1.tar.gz
nextcloud-server-520724d757af0645fd9847f8d1606d7341942fc1.zip
Necessary code changes to make browser plugin properly work
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/carddav/plugin.php4
-rw-r--r--apps/dav/lib/connector/sabre/davaclplugin.php2
2 files changed, 5 insertions, 1 deletions
diff --git a/apps/dav/lib/carddav/plugin.php b/apps/dav/lib/carddav/plugin.php
index d94dce1db0e..e02cc5686b8 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 4a9dd66161d..f5699b469c3 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);