ash_policy_authorizer v0.11.0 AshPolicyAuthorizer.Check behaviour View Source

A behaviour for declaring checks, which can be used to easily construct authorization rules.

Link to this section Summary

Link to this section Types

Specs

authorizer() :: AshPolicyAuthorizer.Authorizer.t()

Specs

check_type() :: :simple | :filter | :manual

Specs

options() :: Keyword.t()

Link to this section Functions

Link to this function

defines_auto_filter?(module)

View Source

Link to this section Callbacks

Link to this callback

auto_filter(arg1, authorizer, options)

View Source (optional)

Specs

auto_filter(Ash.actor(), authorizer(), options()) :: Keyword.t()
Link to this callback

check(arg1, list, map, options)

View Source (optional)

Specs

check(Ash.actor(), [Ash.record()], map(), options()) ::
  {:ok, [Ash.record()] | boolean()} | {:error, Ash.error()}

Specs

describe(options()) :: String.t()
Link to this callback

strict_check(arg1, authorizer, options)

View Source

Specs

strict_check(Ash.actor(), authorizer(), options()) ::
  {:ok, boolean() | :unknown}

Specs

type() :: check_type()