Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion apps/dav/lib/CardDAV/AddressBook.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function getACL() {
],
[
'privilege' => '{DAV:}write-properties',
'principal' => '{DAV:}authenticated',
'principal' => $this->getOwner(),
'protected' => true,
],
];
Expand All @@ -129,6 +129,11 @@ public function getACL() {
'principal' => '{DAV:}authenticated',
'protected' => true,
];
$acl[] = [
'privilege' => '{DAV:}write-properties',
'principal' => '{DAV:}authenticated',
'protected' => true,
];
}

if (!$this->isShared()) {
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/DAV/Sharing/Backend.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ public function applyShareAcl(int $resourceId, array $acl): array {
'principal' => $share['{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}principal'],
'protected' => true,
];
} elseif ($this->resourceType === 'calendar') {
} elseif (in_array($this->resourceType, ['calendar','addressbook'])) {
// Allow changing the properties of read only calendars,
// so users can change the visibility.
$acl[] = [
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/tests/unit/CardDAV/AddressBookTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public function testAcl($expectsWrite, $readOnlyValue, $hasOwnerSet): void {
'protected' => true
], [
'privilege' => '{DAV:}write-properties',
'principal' => '{DAV:}authenticated',
'principal' => $hasOwnerSet ? 'user1' : 'user2',
'protected' => true
]];
if ($hasOwnerSet) {
Expand Down