Prado\Security\TAuthManager::onAuthorize PHP Метод

onAuthorize() публичный Метод

Authorization rules obtained from the application will be used to check if a user is allowed. If authorization fails, the response status code will be set as 401 and the application terminates.
public onAuthorize ( $param )
    public function onAuthorize($param)
    {
        $application = $this->getApplication();
        if ($this->hasEventHandler('OnAuthorize')) {
            $this->raiseEvent('OnAuthorize', $this, $application);
        }
        if (!$application->getAuthorizationRules()->isUserAllowed($application->getUser(), $application->getRequest()->getRequestType(), $application->getRequest()->getUserHostAddress())) {
            $application->getResponse()->setStatusCode(401);
            $application->completeRequest();
        }
    }