mix permit.patch.live_view (permit_phoenix v0.5.0)

Copy Markdown View Source

Patches an existing Phoenix LiveView to use Permit authorization by adding a resource_module/0 callback and @permit_action annotations on handle_event/3 clauses with recognized event names.

Usage

mix permit.patch.live_view MyAppWeb.NoteLive.Index MyApp.Note

Arguments

  • module_name (required) - The LiveView module to patch
  • resource_module (required) - The Ecto schema or resource module

Options

  • --authorization-module - Authorization module name (default: <MyApp>.Authorization)