Kantoor.Accounts.UserMailbox (Kantoor v1.0.0)

Grants a user access to a mailbox, with a role.

  • :read — open and read the mail; no writing and no sending.
  • :send_on_behalf — read and work in the mail, and send with the person's own From address and this mailbox as Sender.
  • :send_as — read and work in the mail, and send with this mailbox's address as From.
  • :manage — everything above, plus the mailbox's rules, away reply and forwarding (and, through the admin area, its members).

Grantees are made by an admin only. A grant on someone else's personal mailbox is a delegation; a grant on a shared mailbox is membership. Admins may open every mailbox regardless.

Summary

Functions

Every role, weakest first.

True for a role the schema accepts.

Types

role()

@type role() :: :read | :send_on_behalf | :send_as | :manage

t()

@type t() :: %Kantoor.Accounts.UserMailbox{
  __meta__: term(),
  id: term(),
  inserted_at: term(),
  mailbox: term(),
  mailbox_id: term(),
  role: term(),
  user: term(),
  user_id: term()
}

Functions

roles()

@spec roles() :: [role()]

Every role, weakest first.

valid_role?(role)

@spec valid_role?(term()) :: boolean()

True for a role the schema accepts.