src/base/RestController.php
public function checkRouteAccess($route)
    {
        UserOnline::refreshUser($this->userAuthClass()->identity, $route);
        
        if (!Yii::$app->auth->matchRoute($this->userAuthClass()->identity->id, $route)) {
            throw new ForbiddenHttpException('Unable to access this action due to insufficient permissions.');
        }
    }
public function checkRouteAccess($route)
    {
        UserOnline::refreshUser($this->userAuthClass()->identity, $route);
        
        if (!Yii::$app->auth->matchRoute($this->userAuthClass()->identity->id, $route)) {
            throw new ForbiddenHttpException('Unable to access this action due to insufficient permissions.');
        }
    }
public function checkRouteAccess ( $ route ) { UserOnline :: refreshUser ( $ this -> userAuthClass ( ) -> identity , $ route ) ; if ( ! Yii :: $ app -> auth -> matchRoute ( $ this -> userAuthClass ( ) -> identity -> id , $ route ) ) { throw new ForbiddenHttpException ( 'Unable to access this action due to insufficient permissions.' ) ; } }
Shorthand method to check whether the current use exists for the given route, otherwise throw forbidden http exception.

@throws ForbiddenHttpException::
@since 1.1.0
Shorthand method to check whether the current use exists for the given route otherwise throw forbidden http exception .