ash v0.1.1 Ash.Authorization.Rule View Source

Link to this section Summary

Link to this section Types

Link to this type

check()

View Source
check() :: {module(), atom(), [term()]}
Link to this type

context()

View Source
context() :: %{
  :resource => Ash.resource(),
  :action => Ash.action(),
  :params => Ash.params(),
  optional(atom()) => term()
}
Link to this type

describe()

View Source
describe() :: String.t()
Link to this type

kind()

View Source
kind() :: :forbid_if | :forbid_unless | :approve_if | :approve_unless
Link to this type

precheck()

View Source
precheck() :: {module(), atom(), [term()]}
Link to this type

precheck_context()

View Source
precheck_context() :: {:context, %{optional(atom()) => term()}}
Link to this type

precheck_instruction()

View Source
precheck_instruction() :: {:precheck, boolean()}
Link to this type

resource_ids()

View Source
resource_ids() :: [term()]
Link to this type

rule_options()

View Source
rule_options() :: Keyword.t()
Link to this type

side_load_instruction()

View Source
side_load_instruction() :: {:side_load, Ash.side_load()}
Link to this type

t()

View Source
t() :: %Ash.Authorization.Rule{
  check: check(),
  describe: describe(),
  kind: kind(),
  precheck: precheck() | nil
}

Link to this section Functions

Link to this function

result_to_decision(atom, bool)

View Source
result_to_decision(kind(), boolean()) :: Authorizer.result()