protected function isGranted(array $configuration)
    {
        // If no role configuration. Grant rights.
        if (!isset($configuration['roles'])) {
            return true;
        }

        // If no configuration. Grant rights.
        if (!is_array($configuration['roles'])) {
            return true;
        }

        // Check if one of the role is granted
        foreach ($configuration['roles'] as $role) {
            if ($this->authorizationChecker->isGranted($role)) {
                return true;
            }
        }

        // Else return false
        return false;
    }