From 6698033b83d8761de959e877880afc824a86548c Mon Sep 17 00:00:00 2001 From: Moritz Strohm <strohm@data-quest.de> Date: Tue, 19 Mar 2024 15:28:47 +0000 Subject: [PATCH] Course::isCalendarWritable: use user-ID instead of course-ID for call to have_studip_perm, fixes #3849 Closes #3849 Merge request studip/studip!2713 --- lib/models/Course.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/models/Course.class.php b/lib/models/Course.class.php index 34b7d747645..1f609301e01 100644 --- a/lib/models/Course.class.php +++ b/lib/models/Course.class.php @@ -1110,7 +1110,7 @@ class Course extends SimpleORMap implements Range, PrivacyObject, StudipItem, Fe public function isCalendarWritable(string $user_id = null): bool { if ($user_id === null) { - $user_id = self::findCurrent()->id; + $user_id = User::findCurrent()->id; } //Calendar write permissions are granted for all participants -- GitLab