Commit graph

3 commits

Author SHA1 Message Date
303b81d37d refactor: reduce nesting depth in RoleLive.Index.mount
Extract role loading logic into separate private functions to fix Credo warning about nested function body.
2026-01-06 23:57:57 +01:00
a5081793b0
feat: assign admin role to admin user in seeds
Some checks failed
continuous-integration/drone/push Build is failing
- Create Admin role if it doesn't exist
- Assign Admin role to admin@mv.local user
- Remove separate create_admin_role script (integrated into seeds)
2026-01-06 23:55:46 +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