Add a missing condition on permissions in Calendar.php

This commit is contained in:
Alex Tselegidis 2022-11-30 11:22:43 +01:00
parent 80e52ca36d
commit bc0de8ec53

View file

@ -494,6 +494,13 @@ class Calendar extends EA_Controller {
{ {
try try
{ {
$required_permissions = can('view', PRIV_APPOINTMENTS);
if ( ! $required_permissions)
{
throw new RuntimeException('You do not have the required permissions for this task.');
}
$start_date = request('start_date') . ' 00:00:00'; $start_date = request('start_date') . ' 00:00:00';
$end_date = request('end_date') . ' 23:59:59'; $end_date = request('end_date') . ' 23:59:59';