Skip to content

Commit 42740f7

Browse files
hamza221backportbot[bot]
authored andcommitted
fix: add proper ACLs for trashbin proxys
fix: add proper ACLs for trashbin proxys Signed-off-by: Hamza <hamzamahjoubi221@gmail.com> [skip ci]
1 parent b9c22da commit 42740f7

2 files changed

Lines changed: 28 additions & 3 deletions

File tree

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,17 @@ public function getACL(): array {
9494
],
9595
[
9696
'privilege' => '{DAV:}unbind', // For moving and deletion
97-
'principal' => '{DAV:}owner',
97+
'principal' => $this->getOwner(),
98+
'protected' => true,
99+
],
100+
[
101+
'privilege' => '{DAV:}all',
102+
'principal' => $this->getOwner() . '/calendar-proxy-write',
103+
'protected' => true,
104+
],
105+
[
106+
'privilege' => '{DAV:}read',
107+
'principal' => $this->getOwner() . '/calendar-proxy-read',
98108
'protected' => true,
99109
],
100110
];

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

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,24 @@ public function getACL(): array {
125125
],
126126
[
127127
'privilege' => '{DAV:}unbind',
128-
'principal' => '{DAV:}owner',
128+
'principal' => $this->getOwner(),
129+
'protected' => true,
130+
],
131+
[
132+
'privilege' => '{DAV:}read',
133+
'principal' => $this->getOwner() . '/calendar-proxy-write',
134+
'protected' => true,
135+
],
136+
[
137+
'privilege' => '{DAV:}unbind',
138+
'principal' => $this->getOwner() . '/calendar-proxy-write',
129139
'protected' => true,
130-
]
140+
],
141+
[
142+
'privilege' => '{DAV:}read',
143+
'principal' => $this->getOwner() . '/calendar-proxy-read',
144+
'protected' => true,
145+
],
131146
];
132147
}
133148
}

0 commit comments

Comments
 (0)