public function actionPrepare() { parent::actionPrepare(); if ($this->application->passport->isUserAccessLevel(\Service\Passport\Model_Factory::ROLE_ADMIN)) { $this->is_authorised = true; } }
public function actionPrepare() { parent::actionPrepare(); // Требуется уровень доступа не менее админа if (!$this->application->passport->isUserAccessLevel(\Service\Passport\Model_Factory::ROLE_ADMIN)) { return $this->response->setRedirect($this->factory->factoryPages->router->route_client->route_error_404->makeUrl()); } return null; }