Class RawReadReason

java.lang.Object
com.kingsrook.qqq.backend.core.model.actions.tables.query.RawReadReason

public class RawReadReason extends Object
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 Details

    • requiringPermission

      public static RawReadReason requiringPermission(String reason, String permissionName)
      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

      public String getReason()
      Getter for reason
    • getPermissionName

      public String getPermissionName()
      Getter for permissionName
    • getCustomPermissionChecker

      public CustomPermissionChecker getCustomPermissionChecker()
      Getter for customPermissionChecker