Package com.axelor.meta.query.exec
Class QuerySecurity
java.lang.Object
com.axelor.meta.query.exec.QuerySecurity
- All Implemented Interfaces:
SecurityFilters
Resolves the current user's row-level read filter for a model into a JPQL predicate on a given
alias, binding its parameters through the renderer's binder.
A permission's condition is written against self, the way the web client runs it:
SELECT self FROM Model self WHERE condition. The predicate runs it that way too, as a
subquery selecting the ids it admits, rather than renaming self to the alias in the
condition's text: a rename cannot tell the row's self from one a nested subquery of the
condition declares, or from the word inside a string literal.
-
Field Summary
Fields inherited from interface com.axelor.meta.query.render.SecurityFilters
NONE -
Method Summary
Modifier and TypeMethodDescriptionReturns an extra JPQL predicate restricting reads ofmodelatalias, with any literal values bound throughbinder(which returns the:paramplaceholder), ornullif the current user has no row-level filter on the model.
-
Method Details
-
predicate
Description copied from interface:SecurityFiltersReturns an extra JPQL predicate restricting reads ofmodelatalias, with any literal values bound throughbinder(which returns the:paramplaceholder), ornullif the current user has no row-level filter on the model.- Specified by:
predicatein interfaceSecurityFilters
-