public function checkEndpointAccess()
    {
        UserOnline::refreshUser($this->userAuthClass()->identity, $this->id);
        
        if (!Yii::$app->auth->matchApi($this->userAuthClass()->identity->id, $this->id, false)) {
            throw new ForbiddenHttpException('Unable to access this action due to insufficient permissions.');
        }
    }