userSession->isLogged() && ! $this->apiAuthorization->isAllowed($class, $method, $this->userSession->getRole())) { throw new AccessDeniedException('You are not allowed to access to this resource'); } } }