F
Filament6mo ago
arif

Filament Shield allows create/edit/delete despite role restrictions. Shouldn't have these permission

The Filament plugin shield still allows users to create, edit, and delete even though I have not given them access in the roles. Additional details: I am using the plugin https://github.com/bezhanSalleh/filament-shield and I have configured the roles for super_admin so that they can only view data. They should not be able to create, edit, or delete data. However, super_admin users are still able to perform these actions. I have not given them explicit access to do so.
GitHub
GitHub - bezhanSalleh/filament-shield: The easiest and most intuiti...
The easiest and most intuitive way to add access management to your Filament Admin Resources, Pages & Widgets through spatie/laravel-permission - bezhanSalleh/filament-shield
No description
No description
No description
5 Replies
arif
arifOP6mo ago
anyone can help me??
nanopanda
nanopanda6mo ago
@arif Have you generated policies for your models/resources? Shield will not enforce the assigned permissions without a Policy registered
arif
arifOP6mo ago
Thanks bro! But why is the other model already registered, and when I create a new one, this model is not registered (have to create it manually)?
nanopanda
nanopanda6mo ago
Perhaps "shield:generate --all" was run during installation? When you add new Models/Resources you need to rerun in order to generate a Policy
arif
arifOP6mo ago
Ahh... I see Thanks for the explanation!
Want results from more Discord servers?
Add your server