From 4fd84e47bf01958058f6e26b5655fa3671e15f67 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 9 Dec 2024 11:33:12 +0100 Subject: fix(calendar): Fix getting the permissions of the user Signed-off-by: Joas Schilling --- apps/dav/lib/CalDAV/CalendarImpl.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'apps/dav/lib') diff --git a/apps/dav/lib/CalDAV/CalendarImpl.php b/apps/dav/lib/CalDAV/CalendarImpl.php index 919b08eefce..b3062f005ee 100644 --- a/apps/dav/lib/CalDAV/CalendarImpl.php +++ b/apps/dav/lib/CalDAV/CalendarImpl.php @@ -110,6 +110,10 @@ class CalendarImpl implements ICreateFromString, IHandleImipMessage { $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 @@ class CalendarImpl implements ICreateFromString, IHandleImipMessage { public function isWritable(): bool { return $this->calendar->canWrite(); } - + /** * @since 26.0.0 */ -- cgit v1.2.3