SelectoComponents.QueryContract.Policy (selecto_components v0.4.8)

Applies host-owned capability decisions to query contract documents.

Core Selecto describes which fields and filters exist. Host applications can then use this module to project actor-specific policy into that contract without teaching Selecto about roles or a particular authorization engine.

Link to this section Summary

Functions

Applies a capability resolver to field and filter entries in a query contract.

Link to this section Functions

Link to this function

apply(contract, opts \\ [])

@spec apply(
  map(),
  keyword()
) :: map()

Applies a capability resolver to field and filter entries in a query contract.

Entries without a declared capability are left alone. Hidden decisions remove entries from the contract. Disabled decisions keep entries visible but remove the operations that would let a consumer use them.