Class SearchSecurityDecorator

java.lang.Object
io.jmix.search.searching.SearchSecurityDecorator

@Component("search_SearchSecurityDecorator") public class SearchSecurityDecorator extends Object
Decorates CurrentUserSecurityFacade and adds functionality that is necessary for the Search Engine.
  • Field Details

  • Constructor Details

  • Method Details

    • resolveEntitiesAllowedToSearch

      public List<String> resolveEntitiesAllowedToSearch(Collection<String> requestedEntities)
      Resolves a list of entities that the current user is allowed to search based on security policies.
      Parameters:
      requestedEntities - a collection of entity names to be filtered for search permission
      Returns:
      a list of entity names that the user is permitted to search
    • isEntityAttrReadPermitted

      public boolean isEntityAttrReadPermitted(MetaPropertyPath metaPropertyPath)
      Checks if the current user has permission to read the entity attribute specified by the given meta-property path.
      Parameters:
      metaPropertyPath - - the property path for the right checking
      Returns:
      - true if the current user has the permission and false if not.
    • isEntityReadPermitted

      public boolean isEntityReadPermitted(MetaClass metaClass)
      Checks if the current user has permission to read the entity that is represented with the MetaClass.
      Parameters:
      metaClass - - a MetaClass of the entity for the right checking
      Returns:
      - true if the current user has the permission and false if not.