diff --git a/apps/dav/lib/CalDAV/CalendarImpl.php b/apps/dav/lib/CalDAV/CalendarImpl.php index 919b08eefce2b..b3062f005ee27 100644 --- a/apps/dav/lib/CalDAV/CalendarImpl.php +++ b/apps/dav/lib/CalDAV/CalendarImpl.php @@ -110,6 +110,10 @@ public function getPermissions(): int { $permissions = $this->calendar->getACL(); $result = 0; foreach ($permissions as $permission) { + if ($this->calendarInfo['principaluri'] !== $permission['principal']) { + continue; + } + switch ($permission['privilege']) { case '{DAV:}read': $result |= Constants::PERMISSION_READ; @@ -133,7 +137,7 @@ public function getPermissions(): int { public function isWritable(): bool { return $this->calendar->canWrite(); } - + /** * @since 26.0.0 */ diff --git a/lib/public/Calendar/ICalendar.php b/lib/public/Calendar/ICalendar.php index f29d6f3017636..2dfc1ca632f43 100644 --- a/lib/public/Calendar/ICalendar.php +++ b/lib/public/Calendar/ICalendar.php @@ -53,7 +53,7 @@ public function getDisplayColor(): ?string; public function search(string $pattern, array $searchProperties = [], array $options = [], ?int $limit = null, ?int $offset = null): array; /** - * @return int build up using \OCP\Constants + * @return int build up using {@see \OCP\Constants} * @since 13.0.0 */ public function getPermissions(): int;