#
View Source Ash.Policy.SimpleCheck behaviour (ash v2.14.2)

A type of check that operates only on request context, never on the data

Define `match?/3`, which gets the actor, request context, and opts, and returns true or false

# Link to this section Summary

## Types

context()
options()

## Callbacks

match?(actor, context, options)

Whether or not the request matches the check

# 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.Changeset.t(),
      optional(any()) => any()
    }

Link to this type

# options()

View Source

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

# Link to this section Callbacks

Link to this callback

# match?(actor, context, options)

View Source

    @callback match?(actor :: struct(), context(), options()) :: boolean()

Whether or not the request matches the check