Commit graph

5 commits

Author SHA1 Message Date
cf220b9730 refactor: extract shared helpers for RoleLive modules
Extract format_error and permission_set_badge_class functions into
MvWeb.RoleLive.Helpers module to eliminate code duplication between
Index and Show LiveViews.
2026-01-08 14:25:28 +01:00
c27b903018
refactor: replace cond with if in handle_delete_role functions
All checks were successful
continuous-integration/drone/push Build is passing
2026-01-08 13:56:08 +01:00
4f371352e2 refactor: extract ensure_user_role_loaded into shared on_mount hook
Move duplicate ensure_user_role_loaded logic into MvWeb.LiveHelpers
on_mount hook to eliminate code duplication across RoleLive modules
and centralize security-related user role loading.
2026-01-08 13:50:33 +01:00
fe8b4a65dd
fix: use reraise instead of raise in rescue blocks
Replace raise with reraise to preserve the original stacktrace when
re-raising exceptions in rescue blocks, improving error debugging.
2026-01-08 13:30:36 +01:00
8820ce6429
feat: implement role management LiveViews
Add complete CRUD interface for role management under /admin/roles.

- Index page with table showing name, description, permission_set_name, is_system_role
- Show page for role details
- Form component for create/edit with permission_set_name dropdown
- System role badge and disabled delete button
- Flash messages for success/error
- Authorization checks using MvWeb.Authorization helpers
- Comprehensive test coverage (22 tests)

Routes added under /admin scope. All LiveViews load user role
for authorization checks. Form uses custom dropdown for permission sets.
2026-01-06 23:36:26 +01:00