Centralize role preloading in global LiveView on_mount

Add ensure_user_role_loaded to global live_view quote block.
Remove redundant on_mount calls from individual LiveViews.
This commit is contained in:
Moritz 2026-01-22 21:36:15 +01:00 committed by Simon
parent fb5f4990b8
commit 3852c93ac9
Signed by: simon
GPG key ID: 40E7A58C4AA1EDB2
12 changed files with 2 additions and 18 deletions

View file

@ -19,8 +19,6 @@ defmodule MvWeb.RoleLive.Show do
import MvWeb.RoleLive.Helpers,
only: [format_error: 1, permission_set_badge_class: 1, opts_with_actor: 3]
on_mount {MvWeb.LiveHelpers, :ensure_user_role_loaded}
@impl true
def mount(%{"id" => id}, _session, socket) do
try do