Skip to content
Snippets Groups Projects
Commit f535cc8e authored by Elmar Ludwig's avatar Elmar Ludwig Committed by Jan-Hendrik Willms
Browse files

also check SEM_VISIBILITY_PERM, fixes #437

parent 51c6c635
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
}
$event_title = '';
$prefix = '';
$icon = '';
if ($user instanceof User) {
......@@ -1676,12 +1675,13 @@ class ResourceBooking extends SimpleORMap implements PrivacyObject, Studip\Calen
$course = $this->assigned_course_date->course;
if ($course instanceof Course) {
$has_perms = $GLOBALS['perm']->have_studip_perm('user', $course->id, $user->id);
if ($has_perms || $course->visible) {
$event_title = $prefix . $this->getAssignedUserName();
$vis_perms = $GLOBALS['perm']->have_perm(Config::get()->SEM_VISIBILITY_PERM, $user->id);
if ($has_perms || $vis_perms || $course->visible) {
$event_title = $this->getAssignedUserName();
}
}
} else {
$event_title = $prefix . $this->getAssignedUserName();
$event_title = $this->getAssignedUserName();
}
$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