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

@ -33,7 +33,6 @@ defmodule MvWeb.UserLive.Form do
"""
use MvWeb, :live_view
on_mount {MvWeb.LiveHelpers, :ensure_user_role_loaded}
import MvWeb.LiveHelpers, only: [current_actor: 1, submit_form: 3]
@impl true