/**
   * Adding or removing the [slv:forbiddenDownloadForRoles] optional property.
   *
   * @param document
   * @param documentNode
   * @throws RepositoryException
   */
  protected void setForbiddenDownloadForRolesOptionalNodeProperty(
      SimpleDocument document, Node documentNode) throws RepositoryException {

    if (CollectionUtil.isNotEmpty(document.getForbiddenDownloadForRoles())) {
      // Adding the mixin (no impact when it is already existing)
      documentNode.addMixin(SLV_DOWNLOADABLE_MIXIN);
      addStringProperty(
          documentNode,
          SLV_PROPERTY_FORBIDDEN_DOWNLOAD_FOR_ROLES,
          SilverpeasRole.asString(document.getForbiddenDownloadForRoles()));
    } else {
      // Removing the mixin
      if (documentNode.hasProperty(SLV_PROPERTY_FORBIDDEN_DOWNLOAD_FOR_ROLES)) {
        documentNode.removeMixin(SLV_DOWNLOADABLE_MIXIN);
      }
    }
  }
 public boolean isUserAuthorized(Set<SilverpeasRole> componentUserRoles) {
   return CollectionUtil.isNotEmpty(componentUserRoles);
 }