Skip to content
Snippets Groups Projects
Commit b1e6e13f authored by Moritz Strohm's avatar Moritz Strohm
Browse files

Course::isCalendarWritable: use user-ID instead of course-ID for call to...

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 6698033b)

fee050f1 Course::isCalendarWritable: use user-ID instead of course-ID for call to have_studip_perm
parent c6712fec
No related branches found
No related tags found
No related merge requests found
...@@ -1110,7 +1110,7 @@ class Course extends SimpleORMap implements Range, PrivacyObject, StudipItem, Fe ...@@ -1110,7 +1110,7 @@ class Course extends SimpleORMap implements Range, PrivacyObject, StudipItem, Fe
public function isCalendarWritable(string $user_id = null): bool public function isCalendarWritable(string $user_id = null): bool
{ {
if ($user_id === null) { if ($user_id === null) {
$user_id = self::findCurrent()->id; $user_id = User::findCurrent()->id;
} }
//Calendar write permissions are granted for all participants //Calendar write permissions are granted for all participants
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment