Class RawReadReason
java.lang.Object
com.kingsrook.qqq.backend.core.model.actions.tables.query.RawReadReason
Why (and under what authority) a caller is asking for a "raw read" - see
QueryInput.withRawRead(RawReadReason).
A raw read returns hidden fields, unmasked password fields, and heavy fields
(and skips possible-value translation and display values), so it is gated:
the reason carries either the name of a permission that the current session
must hold, or a CustomPermissionChecker that must not throw. There is
deliberately no "no check" option.-
Method Summary
Modifier and TypeMethodDescriptionstatic RawReadReasoncheckedBy(String reason, CustomPermissionChecker customPermissionChecker) A raw read allowed when the supplied checker does not throw.voidcheckPermission(QueryInput queryInput, QTableMetaData table) Check that the current session may do this raw read of the given table.Getter for customPermissionCheckerGetter for permissionNameGetter for reasonstatic RawReadReasonrequiringPermission(String reason, String permissionName) A raw read allowed to sessions holding the named permission (e.g., "backups.run").
-
Method Details
-
requiringPermission
A raw read allowed to sessions holding the named permission (e.g., "backups.run"). -
checkedBy
public static RawReadReason checkedBy(String reason, CustomPermissionChecker customPermissionChecker) A raw read allowed when the supplied checker does not throw. The checker is called with the query input and the queried table's metadata. -
checkPermission
public void checkPermission(QueryInput queryInput, QTableMetaData table) throws QPermissionDeniedException Check that the current session may do this raw read of the given table.- Throws:
QPermissionDeniedException- if it may not.
-
getReason
Getter for reason -
getPermissionName
Getter for permissionName -
getCustomPermissionChecker
Getter for customPermissionChecker
-