#
View Source Ash.Policy.FilterCheckWithContext behaviour (ash v2.6.31)

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

# Link to this section Summary

## Types

context()
options()

## Callbacks

filter(actor, context, options)
reject(actor, context, options)

## Functions

is_filter_check?(module)

# Link to this section Types

Link to this type

# context()

View Source

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

Link to this type

# options()

View Source

    @type options() :: Keyword.t()

# Link to this section 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()

# Link to this section Functions

Link to this function

# is_filter_check?(module)

View Source