ash_policy_access v0.1.0 AshPolicyAccess.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

Link to this section Functions

Link to this function

defines_auto_filter?(module)

View Source
Link to this macro

import_default_checks(opts)

View Source (macro)
Link to this macro

unimport_checks()

View Source (macro)

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()) :: boolean() | :unknown

Specs

type() :: :atom