Class PersistPermissionServiceImpl

java.lang.Object
ch.tocco.nice2.persist.security.impl.PersistPermissionServiceImpl
All Implemented Interfaces:
PersistPermissionService

@Component public class PersistPermissionServiceImpl extends Object implements PersistPermissionService
  • Constructor Details

    • PersistPermissionServiceImpl

      public PersistPermissionServiceImpl(CommandExecutor executor)
  • Method Details

    • hasEntityManagerPermission

      public boolean hasEntityManagerPermission(String entityModel, String... permissions)
      Description copied from interface: PersistPermissionService
      Returns true if all specified permissions are granted to the current user for the specified entity model.
      Specified by:
      hasEntityManagerPermission in interface PersistPermissionService
      Parameters:
      entityModel - the entity model
      permissions - the permission to check
      Returns:
      true if granted, false otherwise
    • hasEntityManagerPermission

      public boolean hasEntityManagerPermission(String entityModel, Permission... permissions)
      Specified by:
      hasEntityManagerPermission in interface PersistPermissionService
    • hasEntityPermission

      public boolean hasEntityPermission(String entityModel, String primaryKey, String... permissions)
      Description copied from interface: PersistPermissionService
      Checks the all specified permissions against the current user and the specified entity.
      Specified by:
      hasEntityPermission in interface PersistPermissionService
      Parameters:
      entityModel - the entity model
      primaryKey - a primary key that identifies an existing entity
      permissions - the permissions to check
      Returns:
      true, if all specified permissions are granted