View Source Ash.Policy.FilterCheckWithContext behaviour (ash v2.9.20)
A type of check that is represented by a filter statement, and has access to the context.
Link to this section Summary
Link to this section Types
@type context() :: %{ :action => Ash.Resource.Actions.action(), :resource => Ash.Resource.t(), :api => Ash.Api.t(), optional(:query) => Ash.Query.t(), optional(:changeset) => Ash.Query.t(), optional(any()) => any() }
@type options() :: Keyword.t()
Link to this section Callbacks
@callback filter(actor :: term(), context(), options()) :: Keyword.t() | Ash.Expr.t()
@callback reject(actor :: term(), context(), options()) :: Keyword.t() | Ash.Expr.t()