Skip to content

Commit 8350e96

Browse files
committed
fix: add proper ACLs for trashbin proxys
Signed-off-by: Hamza <hamzamahjoubi221@gmail.com>
1 parent 548708d commit 8350e96

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

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

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

40+
#[\Override]
41+
public function getACL(): array {
42+
$ownerPrincipal = $this->principalInfo['uri'];
43+
return [
44+
[
45+
'privilege' => '{DAV:}all',
46+
'principal' => $ownerPrincipal,
47+
'protected' => true,
48+
],
49+
[
50+
'privilege' => '{DAV:}read',
51+
'principal' => $ownerPrincipal . '/calendar-proxy-write',
52+
'protected' => true,
53+
],
54+
[
55+
'privilege' => '{DAV:}read',
56+
'principal' => $ownerPrincipal . '/calendar-proxy-read',
57+
'protected' => true,
58+
],
59+
];
60+
}
61+
4062
#[\Override]
4163
public function createFile($name, $data = null) {
4264
throw new Forbidden('Permission denied to create files in the trashbin');

0 commit comments

Comments
 (0)