/** * check if the user is allowed to actually read the calendar * @param ICalendar $calendar * @throws BusinessLayer\Exception */ private function checkAllowedToRead(ICalendar $calendar) { if (!$calendar->doesAllow(Permissions::READ)) { throw new BusinessLayer\Exception('Not allowed to read calendar', HTTP::STATUS_FORBIDDEN); } }