public function checksUserAccess(array $entityConfig, string $actionName, $subject = null)
    {
        if ($this->adminMinimumRole && !$this->authorizationChecker->isGranted($this->adminMinimumRole)) {
            throw new AccessDeniedException(
                \sprintf('You must be granted %s role to access admin !', $this->adminMinimumRole)
            );
        }

        $requiredRole = $this->getRequiredRole($entityConfig, $actionName);

        if ($requiredRole && !$this->authorizationChecker->isGranted($requiredRole, $subject)) {
            throw new AccessDeniedException(
                \sprintf('You must be granted %s role to perform this entity action !', $requiredRole)
            );
        }
    }