Skip to content
Snippets Groups Projects
Commit 6698033b 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
parent 40f628c1
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.
Finish editing this message first!
Please register or to comment