Permit.Actions behaviour (permit v0.0.3)

Link to this section Summary

Link to this section Callbacks

Link to this callback

grouping_schema()

@callback grouping_schema() :: %{
  required(Permit.Types.controller_action()) => [Permit.Types.action_group()]
}
Link to this callback

singular_groups()

@callback singular_groups() :: [Permit.Types.action_group()]

Link to this section Functions

Link to this function

traverse_actions(actions_module, key, condition, value, empty, join)

Link to this function

traverse_actions!(actions_module, key, condition, value, empty, join)

Link to this function

verify_transitively(actions_module, action, verify_fn)

@spec verify_transitively(
  module(),
  Permit.Types.controller_action(),
  (Permit.Types.controller_action() -> boolean())
) ::
  {:ok, boolean()}
  | {:error, :cycle, [Permit.Types.action_group()]}
  | {:error, :not_defined, Permit.Types.action_group()}
Link to this function

verify_transitively!(actions_module, action, verify_fn)

@spec verify_transitively!(
  module(),
  Permit.Types.controller_action(),
  (Permit.Types.controller_action() -> boolean())
) :: boolean()