Caravela.Schema.Permission (Caravela v0.5.2)

Copy Markdown View Source

An authorization rule declared via can_read, can_create, can_update, or can_delete.

Compiled into a clause of __caravela_permission__ on the domain module. This struct records the (action, entity) pair so generators know which permission checks to wire into the context.

Summary

Types

action()

@type action() :: :can_read | :can_create | :can_update | :can_delete

t()

@type t() :: %Caravela.Schema.Permission{
  action: action(),
  arity: non_neg_integer(),
  entity: atom()
}