Class ModuleAccessValidator

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

@Service @Qualifier("module") public class ModuleAccessValidator extends Object implements AccessPrivilegeValidator
ModuleAccessValidator is an implementation of the AccessPrivilegeValidator interface that validates access based on the license modules. It checks if a user has a valid license for the required modules to access the requested class.
  • Field Details

  • Constructor Details

    • ModuleAccessValidator

      public ModuleAccessValidator()
  • 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