Skip to content

Commit 0f2fe6b

Browse files
fix(dav): calculate permissions based on addressbook principal
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
1 parent 6e9d48b commit 0f2fe6b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

apps/dav/lib/CardDAV/AddressBookImpl.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,10 @@ public function getPermissions() {
152152
$permissions = $this->addressBook->getACL();
153153
$result = 0;
154154
foreach ($permissions as $permission) {
155+
if ($this->addressBookInfo['principaluri'] !== $permission['principal']) {
156+
continue;
157+
}
158+
155159
switch ($permission['privilege']) {
156160
case '{DAV:}read':
157161
$result |= Constants::PERMISSION_READ;

0 commit comments

Comments
 (0)