Skip to content

Commit 16206b0

Browse files
committed
fix: add proper ACLs for trashbin proxys
Signed-off-by: Hamza <hamzamahjoubi221@gmail.com>
1 parent d56ad83 commit 16206b0

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

apps/dav/lib/CalDAV/Trashbin/TrashbinHome.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,34 @@ public function getOwner(): string {
3737
return $this->principalInfo['uri'];
3838
}
3939

40+
/**
41+
* Grant calendar-proxy delegates read access to the trashbin so a delegate's
42+
* PROPFIND on the owner's calendar home does not 404 when this collection is
43+
* enumerated. Without this, DavAclPlugin maps "no access" to NotFound and
44+
* aborts the whole PROPFIND.
45+
*/
46+
#[\Override]
47+
public function getACL(): array {
48+
$ownerPrincipal = $this->principalInfo['uri'];
49+
return [
50+
[
51+
'privilege' => '{DAV:}all',
52+
'principal' => $ownerPrincipal,
53+
'protected' => true,
54+
],
55+
[
56+
'privilege' => '{DAV:}read',
57+
'principal' => $ownerPrincipal . '/calendar-proxy-write',
58+
'protected' => true,
59+
],
60+
[
61+
'privilege' => '{DAV:}read',
62+
'principal' => $ownerPrincipal . '/calendar-proxy-read',
63+
'protected' => true,
64+
],
65+
];
66+
}
67+
4068
#[\Override]
4169
public function createFile($name, $data = null) {
4270
throw new Forbidden('Permission denied to create files in the trashbin');

0 commit comments

Comments
 (0)