waguilar33/filament-guardian
Filament Guardian is a Laravel/Filament plugin for managing roles and permissions in your admin panel. It offers a clean UI to assign roles, define permissions, and protect resources, making authorization simple and maintainable.
php artisan migrate. The roles/permissions tables and the super-admin role are the core of the package.Gate::before bypass is wired up. That bypass is what gives the super-admin role its power — and it is exactly what v1.14.0 hardens.RolePolicy next. It governs attach/detach for normal roles, but as of v1.14.0 it no longer governs the super-admin role at all.Attach:Role/Detach:Role and confirm the Users tab on the super-admin role now hides Attach, Detach, and bulk detach.RolePolicy for every non-super-admin role. Keep policy methods thin and delegate to permission checks such as Attach:Role / Detach:Role.actingAs($superAdmin) to assert the bypass, and actingAs($roleManager) to assert the Users tab hides attach/detach on the super-admin role.Attach:Role or Detach:Role to manage super-admin membership will find those actions gone from the Users tab. This is intentional, and it applies to the super-admin role regardless of what RolePolicy returns. Every other role still follows your policy as before.Gate::before bypass means ordinary policy checks never run for super admins. Do not assume a RolePolicy::attach denial protects super-admin membership — it does not, and the UI now enforces that separately.How can I help you explore Laravel packages today?