Class PermissionAccessValidator

java.lang.Object
overit.geocall.platform.grants.validators.PermissionAccessValidator
All Implemented Interfaces:
AccessPrivilegeValidator

@Service @Qualifier("permission") public class PermissionAccessValidator extends Object implements AccessPrivilegeValidator
Represents a permission grant validator. This class implements the AccessPrivilegeValidator interface and provides functionality to determine if access to the passed class is granted based on the Permission linked to the current Identity.
  • Field Details

  • Constructor Details

    • PermissionAccessValidator

      public PermissionAccessValidator()
  • Method Details

    • canHandle

      public boolean canHandle(Class<?> cls)
      Description copied from interface: AccessPrivilegeValidator
      Determines whether the given bean class can be handled by this validator.
      Specified by:
      canHandle in interface AccessPrivilegeValidator
      Parameters:
      cls - the class to be checked (might be null)
      Returns:
      true if the bean can be handled, false otherwise
    • validate

      public PrivilegeViolation validate(Class<?> cls)
      Description copied from interface: AccessPrivilegeValidator
      Determines whether access to the given object class is granted based on specific criteria.
      Specified by:
      validate in interface AccessPrivilegeValidator
      Parameters:
      cls - the class to be checked for access (might be null)
      Returns:
      a PrivilegeViolation instance if there is any violation or null otherwise