a2zwebltd/nova-role-manager
Nova Role Manager adds a clean Laravel Nova interface for creating, editing, and assigning roles and permissions. Built around spatie/laravel-permission, it lets you manage access control, attach permissions to roles, and assign roles to users directly from your Nova dashboard without custom code.
Architecture fit
/nova-vendor/role-manager/) that sits on top of Spatie laravel-permission and exposes role/permission writes through the Nova admin surface. It is a thin admin-plane package, not a runtime authorization dependency — application authorization still runs through Spatie gates/policies. That keeps blast radius contained to the admin UI/API.save, toggle, bulk-toggle) behind one guard that checks both edit_permission and protected_roles is the right architectural move: authorization becomes a single choke point rather than per-endpoint duplication, which is what caused the bypass.Integration feasibility
role-manager.role_model, protected_roles, edit_permission) → register tool in NovaServiceProvider. The role_model fix means non-default Spatie setups (renamed permission.table_names.roles or a custom Role model) are now supported without code changes — a real unblocker for tenants with custom schemas.Technical risk
protected_roles configured (e.g. SUPER_ADMIN) has had an open path for anyone with Nova tool access to grant/revoke permissions on protected roles via direct POST to the toggle endpoints. Treat as a potential incident, not just an upgrade.edit_permission and protected_roles), which is correct but will surface as 403s for any script, saved request, or custom UI that previously relied on the bypass./toggle or /bulk-toggle on protected roles will now be denied. This is intentional but is a de-facto breaking change for automation.Key questions
spatie/laravel-permission) and is this package actively maintained between releases?edit_permission a Nova ability/gate string evaluated via Gate::allows, and does it apply to the Nova UI as well as the HTTP endpoints, or only the endpoints?protected_roles matched — role name, id, or model instance? Case sensitivity? Does it cover wildcards?bulk-toggle atomic (DB transaction) and per-item validated, or does one protected role in the payload abort the whole batch?Stack fit
protected_roles appears to be a global config list rather than per-tenant.Migration path
^1.2.1 / >=1.2.1, pin minimum — ^1.2.0 may resolve to a vulnerable version depending on lockfile state). Ship as a security hotfix through the normal change process if a CAB exists.role-manager.role_model points at the real model, protected_roles lists every role that must never be mutated in the UI (super admin, break-glass, service roles), and edit_permission is a tightly held ability.toggle and bulk-toggle.POST /nova-vendor/role-manager/role-permissions/toggle and /bulk-toggle on pre-patch builds; reconcile any permission changes on protected roles.Compatibility
role_model will now fail validation — verify config before rollout rather than after.Sequencing
edit_permission cases).Maintenance
Support
composer audit.Scaling
bulk-toggle is the only scaling-adjacent endpoint — validate batch size limits and that large payloads don't produce partial writes or long-held transactions.Failure modes
edit_permission isn't granted or protected_roles is over-broad, admins lose the ability to manage roles entirely — including break-glass recovery. Document the config-based recovery path (edit config / direct DB) before rollout.role_model → validation rejections on every write, surfacing as generic 422s.bulk-toggle remains the top residual technical unknown.Ramp-up
How can I help you explore Laravel packages today?