Declares a piece of data to fetch before a rule is evaluated.
Loads are resolved once per request before any pre-op rule runs.
Each rule references the loaded record by name via loaded(:name)
in its condition.
Fields
:name— atom; how the loaded record is referenced in conditions:loader— atom; key in the schema'sloadersblock:by— condition expression that evaluates to the lookup key (e.g.{:arg, :id}):remote_key— atom; field on the loaded record to match against, ornilif the loader takes the key directly
Summary
Types
@type t() :: %AbsinthePermission.Load{ by: AbsinthePermission.Condition.expr(), loader: atom(), name: atom(), remote_key: atom() | nil }