MDL-59393 calendar: stop user editing module events

This commit is contained in:
Ryan Wyllie 2017-08-18 05:29:07 +00:00
parent 5ca142dc5b
commit 909d08588d
5 changed files with 72 additions and 5 deletions

View file

@ -114,7 +114,7 @@ $formoptions = new stdClass;
if ($eventid !== 0) {
$title = get_string('editevent', 'calendar');
$event = calendar_event::load($eventid);
if (!calendar_edit_event_allowed($event)) {
if (!calendar_edit_event_allowed($event, true)) {
print_error('nopermissions');
}
$event->action = $action;