Cinder.AshOptions (Cinder v0.13.0)

Copy Markdown View Source

Resolves actor, tenant, and scope into options for Ash calls.

Cinder accepts :actor, :tenant, and :scope from host LiveViews. The scope is an Ash 3 idiom: a struct implementing Ash.Scope.ToOpts that carries actor, tenant, tracer, and context together. This module unifies how both the read and bulk-action pipelines resolve those inputs so scope is always honoured, with explicit actor/tenant overriding the scope's.

Summary

Functions

Resolves actor, tenant, and scope into {actor, tenant, scope_opts}.

Functions

resolve(actor, tenant, scope)

@spec resolve(any(), any(), any()) :: {any(), any(), keyword()}

Resolves actor, tenant, and scope into {actor, tenant, scope_opts}.

scope_opts contains any non-actor/tenant options the scope exposes (tracer, context, authorize?), suitable for merging into the final Ash options. An invalid scope is tolerated and treated as an empty list.