aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorChristoph Wurst <ChristophWurst@users.noreply.github.com>2024-01-18 10:42:14 +0100
committerGitHub <noreply@github.com>2024-01-18 10:42:14 +0100
commitd9d222d18a7309ad1c8ce5311b3b4819fe365cb4 (patch)
tree8f1e31f0b9ac68f38259031a675b82bac428b917 /apps
parent0e40457b86ae8ba0937a9e335e12d9b04eba1bb4 (diff)
parentb454156f57b4bbbdbff9636b5e060a227102fb9c (diff)
downloadnextcloud-server-d9d222d18a7309ad1c8ce5311b3b4819fe365cb4.tar.gz
nextcloud-server-d9d222d18a7309ad1c8ce5311b3b4819fe365cb4.zip
Merge pull request #42850 from nextcloud/fix/caldav/update-acls-deletedcalendarobjectscollection
fix(CalDAV): set acls for DeletedCalendarObjectsCollection
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/CalDAV/Trashbin/DeletedCalendarObjectsCollection.php25
1 files changed, 24 insertions, 1 deletions
diff --git a/apps/dav/lib/CalDAV/Trashbin/DeletedCalendarObjectsCollection.php b/apps/dav/lib/CalDAV/Trashbin/DeletedCalendarObjectsCollection.php
index f7f0bd7b512..5362b45ee7b 100644
--- a/apps/dav/lib/CalDAV/Trashbin/DeletedCalendarObjectsCollection.php
+++ b/apps/dav/lib/CalDAV/Trashbin/DeletedCalendarObjectsCollection.php
@@ -31,11 +31,15 @@ use Sabre\DAV\Exception\BadRequest;
use Sabre\DAV\Exception\Forbidden;
use Sabre\DAV\Exception\NotFound;
use Sabre\DAV\Exception\NotImplemented;
+use Sabre\DAVACL\ACLTrait;
+use Sabre\DAVACL\IACL;
use function array_map;
use function implode;
use function preg_match;
-class DeletedCalendarObjectsCollection implements ICalendarObjectContainer {
+class DeletedCalendarObjectsCollection implements ICalendarObjectContainer, IACL {
+ use ACLTrait;
+
public const NAME = 'objects';
/** @var CalDavBackend */
@@ -129,4 +133,23 @@ class DeletedCalendarObjectsCollection implements ICalendarObjectContainer {
[$calendarInfo['id'], 'ics'],
);
}
+
+ public function getOwner() {
+ return $this->principalInfo['uri'];
+ }
+
+ public function getACL(): array {
+ return [
+ [
+ 'privilege' => '{DAV:}read',
+ 'principal' => $this->getOwner(),
+ 'protected' => true,
+ ],
+ [
+ 'privilege' => '{DAV:}unbind',
+ 'principal' => '{DAV:}owner',
+ 'protected' => true,
+ ]
+ ];
+ }
}