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)
      Gets a filtered list of the names of the entities that could be read with the current user.
      Parameters:
      requestedEntities - - a list of the entity names for the rights checking
      Returns:
      a filtered list of the names of the entities that could be read with the current user
    • 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 rights 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 rights checking
      Returns:
      - true if the current user has the permission and false if not.