Package com.axelor.meta.query
Record Class PlatformQueryAccess
java.lang.Object
java.lang.Record
com.axelor.meta.query.PlatformQueryAccess
- Record Components:
user- null for a trusted context, which the validator does not check
- All Implemented Interfaces:
QueryAccess,SecurityFilters
public record PlatformQueryAccess(User user, QueryAccessValidator validator, SecurityFilters rows)
extends Record
implements QueryAccess
The platform's permissions for
user: model and field checks from QueryAccessValidator, row predicates from rows.-
Field Summary
Fields inherited from interface com.axelor.meta.query.render.SecurityFilters
NONE -
Constructor Summary
ConstructorsConstructorDescriptionPlatformQueryAccess(User user, QueryAccessValidator validator, SecurityFilters rows) Creates an instance of aPlatformQueryAccessrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckFieldRead(ResolvedModel model, String path, String label) Refuses readingpathonmodel, and every model the path passes through.voidcheckModelRead(ResolvedModel model, String target) Refuses readingmodel.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns 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.rows()Returns the value of therowsrecord component.final StringtoString()Returns a string representation of this record class.user()Returns the value of theuserrecord component.Returns the value of thevalidatorrecord component.
-
Constructor Details
-
PlatformQueryAccess
Creates an instance of aPlatformQueryAccessrecord class.- Parameters:
user- the value for theuserrecord componentvalidator- the value for thevalidatorrecord componentrows- the value for therowsrecord component
-
-
Method Details
-
checkModelRead
Description copied from interface:QueryAccessRefuses readingmodel.- Specified by:
checkModelReadin interfaceQueryAccess- Parameters:
target- how a refusal names what the query reads
-
checkFieldRead
Description copied from interface:QueryAccessRefuses readingpathonmodel, and every model the path passes through.- Specified by:
checkFieldReadin interfaceQueryAccess- Parameters:
label- how a refusal names the part of the query that reads it
-
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
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
user
Returns the value of theuserrecord component.- Returns:
- the value of the
userrecord component
-
validator
Returns the value of thevalidatorrecord component.- Returns:
- the value of the
validatorrecord component
-
rows
Returns the value of therowsrecord component.- Returns:
- the value of the
rowsrecord component
-