protected function verifyActionAccess(CAction $action)
{
$actionType = $this->getActionType($action->id);
$method = "check{$actionType}Access";
if (!method_exists($this, $method)) {
throw new Exception("No access check method found for action type '{$actionType}'");
}
if (!$this->{$method}()) {
switch ($actionType) {
case self::ACTION_TYPE_CREATE:
case self::ACTION_TYPE_EDIT:
$this->redirectToPatientEpisodes();
break;
default:
throw new CHttpException(403);
}
}
}