Necessary code changes to make browser plugin properly work
This commit is contained in:
parent
7d638fdb34
commit
520724d757
2 changed files with 5 additions and 1 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue