Raxol.Agent.Sandbox.Chain (Raxol Agent v2.6.0)

Copy Markdown View Source

Walk a list of sandboxes for a single authorization decision.

Each sandbox is queried in order. The first {:deny, reason} short-circuits; otherwise :ok after all sandboxes have abstained or allowed.

Summary

Functions

Authorize an action against a list of sandboxes, first-deny-wins.

Functions

authorize(list, action, payload, ctx)

@spec authorize(
  [Raxol.Agent.Sandbox.t()],
  action :: atom(),
  payload :: term(),
  ctx :: map()
) :: Raxol.Agent.Sandbox.decision()

Authorize an action against a list of sandboxes, first-deny-wins.

Returns :ok when every sandbox abstained or allowed, {:deny, reason} on the first deny.