Grants a user access to a mailbox they do not own.
Modelled on phoenix_kit_calendar's per-calendar view/edit permissions: the
module-level "inbox" permission decides whether a user can use Inbox at
all, and a grant decides which mailboxes they see inside it. A user's own
kind: "user" mailbox needs no grant — ownership implies "admin" access.
Access levels, in increasing order:
"read"— open the mailbox, read messages, mark seen/starred"write"— the above, plus compose and send as the mailbox, move/trash"admin"— the above, plus manage the mailbox's own grants
Tables are created by PhoenixKitInbox.Migrations, never by this schema.
Summary
Types
Functions
Whether held satisfies required.
iex> PhoenixKitInbox.Schemas.MailboxGrant.covers?("admin", "write")
true
iex> PhoenixKitInbox.Schemas.MailboxGrant.covers?("read", "write")
false
@spec levels() :: [String.t()]
Valid access levels, weakest first.