mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix: add proper ACLs for trashbin proxys
fix: add proper ACLs for trashbin proxys Signed-off-by: Hamza <hamzamahjoubi221@gmail.com>
This commit is contained in:
parent
e5e423c498
commit
c6524f9974
3 changed files with 49 additions and 3 deletions
|
|
@ -94,7 +94,17 @@ class DeletedCalendarObject implements IACL, ICalendarObject, IRestorable {
|
|||
],
|
||||
[
|
||||
'privilege' => '{DAV:}unbind', // For moving and deletion
|
||||
'principal' => '{DAV:}owner',
|
||||
'principal' => $this->getOwner(),
|
||||
'protected' => true,
|
||||
],
|
||||
[
|
||||
'privilege' => '{DAV:}all',
|
||||
'principal' => $this->getOwner() . '/calendar-proxy-write',
|
||||
'protected' => true,
|
||||
],
|
||||
[
|
||||
'privilege' => '{DAV:}read',
|
||||
'principal' => $this->getOwner() . '/calendar-proxy-read',
|
||||
'protected' => true,
|
||||
],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -125,9 +125,24 @@ class DeletedCalendarObjectsCollection implements ICalendarObjectContainer, IACL
|
|||
],
|
||||
[
|
||||
'privilege' => '{DAV:}unbind',
|
||||
'principal' => '{DAV:}owner',
|
||||
'principal' => $this->getOwner(),
|
||||
'protected' => true,
|
||||
]
|
||||
],
|
||||
[
|
||||
'privilege' => '{DAV:}read',
|
||||
'principal' => $this->getOwner() . '/calendar-proxy-write',
|
||||
'protected' => true,
|
||||
],
|
||||
[
|
||||
'privilege' => '{DAV:}unbind',
|
||||
'principal' => $this->getOwner() . '/calendar-proxy-write',
|
||||
'protected' => true,
|
||||
],
|
||||
[
|
||||
'privilege' => '{DAV:}read',
|
||||
'principal' => $this->getOwner() . '/calendar-proxy-read',
|
||||
'protected' => true,
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,27 @@ class TrashbinHome implements IACL, ICollection, IProperties {
|
|||
return $this->principalInfo['uri'];
|
||||
}
|
||||
|
||||
#[\Override]
|
||||
public function getACL(): array {
|
||||
return [
|
||||
[
|
||||
'privilege' => '{DAV:}all',
|
||||
'principal' => $this->getOwner(),
|
||||
'protected' => true,
|
||||
],
|
||||
[
|
||||
'privilege' => '{DAV:}all',
|
||||
'principal' => $this->getOwner() . '/calendar-proxy-write',
|
||||
'protected' => true,
|
||||
],
|
||||
[
|
||||
'privilege' => '{DAV:}read',
|
||||
'principal' => $this->getOwner() . '/calendar-proxy-read',
|
||||
'protected' => true,
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function createFile($name, $data = null) {
|
||||
throw new Forbidden('Permission denied to create files in the trashbin');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue