View Source Ash.Policy.SimpleCheck behaviour (ash v3.4.47)

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

Summary

Callbacks

Whether or not the request matches the check

Types

actor()

@type actor() :: Ash.Policy.Check.actor()

context()

@type context() :: Ash.Policy.Authorizer.t()

options()

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

Callbacks

match?(actor, context, options)

@callback match?(actor(), context(), options()) ::
  boolean() | {:ok, boolean()} | {:error, term()}

Whether or not the request matches the check