View Source Ash.Policy.FilterCheckWithContext behaviour (ash v2.14.17)

A type of check that is represented by a filter statement, and has access to the context.

Summary

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()

Callbacks

Link to this callback

filter(actor, context, options)

View Source
@callback filter(actor :: term(), context(), options()) :: Keyword.t() | Ash.Expr.t()
Link to this callback

reject(actor, context, options)

View Source (optional)
@callback reject(actor :: term(), context(), options()) :: Keyword.t() | Ash.Expr.t()

Functions

Link to this function

is_filter_check?(module)

View Source