mirror of
https://github.com/nextcloud/server.git
synced 2026-03-13 06:03:14 -04:00
fix(CalDAV): set acls for DeletedCalendarObjectsCollection
Signed-off-by: Johannes Merkel <mail@johannesgge.de>
This commit is contained in:
parent
ff7131567f
commit
fd6dff89fb
1 changed files with 24 additions and 1 deletions
|
|
@ -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,
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue