shanerbaner82/panel-roles
Panel Roles is a Laravel package for managing roles and permissions inside Filament panels. Define roles, assign them to users, and restrict access to panel resources and pages with an easy-to-configure setup that keeps authorization consistent across your admin panels.
roleToAssign and restrictedRoles mandatory rather than implicit. That is a product-level safety decision: the panel cannot silently fall back to a permissive default, so an admin who can manage users cannot accidentally mint a super-admin. This supports decisions about how much self-serve administration you're willing to expose to customers vs. keep internal.spatie/laravel-permission).Consider it when all of the following hold:
Look elsewhere when:
spatie/laravel-permission plus Laravel policies/gates, and build the assignment UI yourself.roleToAssign singular, restrictedRoles) reads as one-role-per-user with a denylist.Adoption checklist: pin the exact version, add a smoke test asserting a restricted role cannot be assigned, document the restrictedRoles list as a reviewed security control (not a config detail), and confirm it fails closed when misconfigured.
To executives: This is a small, low-cost Filament plugin that lets staff manage user roles from inside the admin panel. The latest release removes a footgun: you must now explicitly declare which role gets assigned and which roles are off-limits, so a misconfiguration can't quietly hand out admin access. Cost is negligible; the main consideration is maturity — it's a pre-1.0 package with a single maintainer, so it belongs in internal admin tooling, not in customer-facing access control.
To engineering: One class, configured per panel. The v0.0.3 change is breaking but directionally right — configuration is now explicit and fails loudly instead of defaulting to something permissive. Pin the version, add a test that a restrictedRoles entry is rejected on assignment, and treat the restricted list as a security-reviewed artifact. It is not an authorization layer: keep gates/policies (or spatie/laravel-permission) as the enforcement point and use this only for the assignment surface. If requirements grow toward multi-tenant or per-permission roles, expect to replace it — budget that as a known exit, not a surprise.
How can I help you explore Laravel packages today?