MailglassAdmin.Operator.DestructiveAction (MailglassAdmin v1.0.0)

Copy Markdown View Source

Shared action-time authorization helper for destructive operator work.

Replay and any future manual repair action should resolve the exact tenant-scoped target first, then authorize via the adopter-owned :destructive_action seam immediately before execution.

Summary

Functions

authorize(socket, adapter, delivery, target)

@spec authorize(Phoenix.LiveView.Socket.t(), module() | nil, map(), map()) ::
  {:ok, Phoenix.LiveView.Socket.t()} | {:error, {:auth, String.t()}}