summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorChristoph Wurst <ChristophWurst@users.noreply.github.com>2024-01-18 11:03:50 +0100
committerGitHub <noreply@github.com>2024-01-18 11:03:50 +0100
commit48ea4da227ff68c31f0912b5ae428d89be58dd2e (patch)
tree2996fc85dbe69e4503cfa88600e457a1046be494 /apps
parent08801969ea6adeb505a91562b0b6f65317e47fc1 (diff)
parent823aa887e52d277dfe15121f24ad6e1d80ed3276 (diff)
downloadnextcloud-server-48ea4da227ff68c31f0912b5ae428d89be58dd2e.tar.gz
nextcloud-server-48ea4da227ff68c31f0912b5ae428d89be58dd2e.zip
Merge pull request #42907 from nextcloud/fix/caldav/update-acls-deletedcalendarobjectscollection-stable27
[stable27] 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 20d05c047b1..0c54839127c 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,
+ ]
+ ];
+ }
}