From b1e6e13f8faf5f8031a5a1356fffa1f09363b181 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 (cherry picked from commit 6698033b83d8761de959e877880afc824a86548c) fee050f1 Course::isCalendarWritable: use user-ID instead of course-ID for call to have_studip_perm --- 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 3f635d71a98..8bca5e9058c 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