Class SecurityUtils

java.lang.Object
ch.tocco.nice2.rest.entity.spi.SecurityUtils

public final class SecurityUtils extends Object
This helper class provides static methods for simple security stuff.
  • Method Details

    • hasReadPermission

      public static boolean hasReadPermission(EntityReference entity, String field)
      Check if the current user is granted to read the given entity.
      Parameters:
      entity - the entity to check.
      Returns:
      true if the user is granted to read the entity, else false.
    • hasWritePermission

      public static boolean hasWritePermission(EntityReference entity, String field)
      Check if the current user is granted to write to the given entity.
      Parameters:
      entity - the entity to check.
      Returns:
      true if the user is granted to write to the entity, else false.