Skip to content
Snippets Groups Projects
Commit 0e2649d9 authored by Elmar Ludwig's avatar Elmar Ludwig
Browse files

also check SEM_VISIBILITY_PERM, fixes #437

parent c14686ea
No related branches found
No related tags found
No related merge requests found
...@@ -1654,7 +1654,6 @@ class ResourceBooking extends SimpleORMap implements PrivacyObject, Studip\Calen ...@@ -1654,7 +1654,6 @@ class ResourceBooking extends SimpleORMap implements PrivacyObject, Studip\Calen
} }
$event_title = ''; $event_title = '';
$prefix = '';
$icon = ''; $icon = '';
if ($user instanceof User) { if ($user instanceof User) {
...@@ -1676,12 +1675,13 @@ class ResourceBooking extends SimpleORMap implements PrivacyObject, Studip\Calen ...@@ -1676,12 +1675,13 @@ class ResourceBooking extends SimpleORMap implements PrivacyObject, Studip\Calen
$course = $this->assigned_course_date->course; $course = $this->assigned_course_date->course;
if ($course instanceof Course) { if ($course instanceof Course) {
$has_perms = $GLOBALS['perm']->have_studip_perm('user', $course->id, $user->id); $has_perms = $GLOBALS['perm']->have_studip_perm('user', $course->id, $user->id);
if ($has_perms || $course->visible) { $vis_perms = $GLOBALS['perm']->have_perm(Config::get()->SEM_VISIBILITY_PERM, $user->id);
$event_title = $prefix . $this->getAssignedUserName(); if ($has_perms || $vis_perms || $course->visible) {
$event_title = $this->getAssignedUserName();
} }
} }
} else { } else {
$event_title = $prefix . $this->getAssignedUserName(); $event_title = $this->getAssignedUserName();
} }
$interval_api_urls = $booking_api_urls; $interval_api_urls = $booking_api_urls;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment