Skip to content
Snippets Groups Projects
Commit 802c7a67 authored by André Noack's avatar André Noack
Browse files

Resolve #4701 "Administration/Veranstaltungs-Stundenplan kann ohne Admin Rechte aufgerufen werden"

Closes #4701

Merge request studip/studip!3495
parent 95f4b928
No related branches found
No related tags found
No related merge requests found
...@@ -12,10 +12,12 @@ class Admin_CourseplanningController extends AuthenticatedController ...@@ -12,10 +12,12 @@ class Admin_CourseplanningController extends AuthenticatedController
{ {
parent::before_filter($action, $args); parent::before_filter($action, $args);
if ($GLOBALS['perm']->have_perm('admin')) { if (!$GLOBALS['perm']->have_perm('admin')) {
Navigation::activateItem('/browse/my_courses/schedule'); throw new AccessDeniedException();
} }
Navigation::activateItem('/browse/my_courses/schedule');
$this->insts = Institute::getMyInstitutes($GLOBALS['user']->id); $this->insts = Institute::getMyInstitutes($GLOBALS['user']->id);
if (empty($this->insts) && !$GLOBALS['perm']->have_perm('root')) { if (empty($this->insts) && !$GLOBALS['perm']->have_perm('root')) {
......
...@@ -142,7 +142,7 @@ class InstituteCalendarHelper ...@@ -142,7 +142,7 @@ class InstituteCalendarHelper
$df = DatafieldEntryModel::findByModel($course, self::COLUMN_DATAFIELD_ID); $df = DatafieldEntryModel::findByModel($course, self::COLUMN_DATAFIELD_ID);
if ($df[0]) { if ($df[0]) {
$event_columns = self::getCourseEventcolumns($course); $event_columns = self::getCourseEventcolumns($course);
if (!is_array($event_columns[$event_id])) { if (isset($event_columns[$event_id]) && !is_array($event_columns[$event_id])) {
unset($event_columns[$event_id]); unset($event_columns[$event_id]);
} }
$event_columns[$event_id][$institut_id] = $column; $event_columns[$event_id][$institut_id] = $column;
......
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