Package io.jmix.search.searching
Class SearchSecurityDecorator
java.lang.Object
io.jmix.search.searching.SearchSecurityDecorator
Decorates CurrentUserSecurityFacade and adds functionality that is necessary for the Search Engine.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Metadataprotected final PolicyStoreprotected final SecureOperations -
Constructor Summary
ConstructorsConstructorDescriptionSearchSecurityDecorator(Metadata metadata, SecureOperations secureOperations, PolicyStore policyStore) -
Method Summary
Modifier and TypeMethodDescriptionbooleanisEntityAttrReadPermitted(MetaPropertyPath metaPropertyPath) Checks if the current user has permission to read the entity attribute specified by the given meta-property path.booleanisEntityReadPermitted(MetaClass metaClass) Checks if the current user has permission to read the entity that is represented with the MetaClass.resolveEntitiesAllowedToSearch(Collection<String> requestedEntities) Gets a filtered list of the names of the entities that could be read with the current user.
-
Field Details
-
metadata
-
secureOperations
-
policyStore
-
-
Constructor Details
-
SearchSecurityDecorator
public SearchSecurityDecorator(Metadata metadata, SecureOperations secureOperations, PolicyStore policyStore)
-
-
Method Details
-
resolveEntitiesAllowedToSearch
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
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
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.
-