fix(CalDAV): set acls for DeletedCalendarObjectsCollection#42850
Conversation
|
|
||
| class DeletedCalendarObjectsCollection implements ICalendarObjectContainer { | ||
| class DeletedCalendarObjectsCollection implements ICalendarObjectContainer, IACL { | ||
| use ACLTrait; |
There was a problem hiding this comment.
This brings
'privilege' => '{DAV:}all',
I think {DAV:}read should be enough, as the collection itself shouldn't be changed, but you'll need to test it.
There was a problem hiding this comment.
You mean by adding:
public function getACL(): array {
return [
[
'privilege' => '{DAV:}read',
'principal' => $this->getOwner(),
'protected' => true,
],
[
'privilege' => '{DAV:}unbind',
'principal' => '{DAV:}owner',
'protected' => true,
]
];
}?
There was a problem hiding this comment.
yes. Otherwise the owner can no longer delete it themself.
There was a problem hiding this comment.
But the owner should be able to delete the elements in the collection, not the collection itself, right?
DeletedCalendarObject already has {DAV:}unbind.
And in any case the delete method here throws Forbidden.
There was a problem hiding this comment.
The deletion does not work either via cadaver or via web interface without {DAV:}unbind for the owner. At least in my setup.
There was a problem hiding this comment.
But the owner should be able to delete the elements in the collection, not the collection itself, right?
DeletedCalendarObjectalready has{DAV:}unbind.And in any case the
deletemethod here throwsForbidden.
It's a bit strange. If you drop unbind from the collection, objects in the collection can't be deleted neither. Sabre returns a Node with name 'objects' could not be found.
Since deletion is indeed protected by the Forbidden, I would like to move forward with this.
There was a problem hiding this comment.
\Sabre\DAVACL\Plugin::beforeUnbind checks the parent for unbind before a node is unbound.
Signed-off-by: Johannes Merkel <[email protected]>
9fd0d9c to
b454156
Compare
Summary
TODO
Checklist