F
Filament2mo 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
arif2mo ago
anyone can help me??
nanopanda
nanopanda2mo ago
@arif Have you generated policies for your models/resources? Shield will not enforce the assigned permissions without a Policy registered
arif
arif2mo 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
nanopanda2mo 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
arif2mo ago
Ahh... I see Thanks for the explanation!
Want results from more Discord servers?
Add your server
More Posts
Check for user profile completeHi! My user model has some extra fields that I would like to be completed. My UserPanel is like this->RenderHook() problem in AdminPanelProvider.php | Class "Filament\View\PanelsRenderHook" not foundHello. I had this same configuration in my last application two months ago and had no problems. ForHas anyone implement QR Code Scanner in a field for filament?So a simple QR that will fill in a certain field on successful scanfileUpload download file directly to download folderPleas, probably i'm doing something wrong, i use file upload component with s3, everything works finForm in resource index pageI'm creating a resource to edit an invoice template, so I only need one data entry, and I don't wantRepeater Button Position - On Top? On top and bottom?Is it possible to have Repeater action buttons at the top AND bottom? If not, can I position the buCheckboxList: modifyOptionsQueryUsing does not existThe docs say there should be this method to modify the options but this method does not exist: httpsBest Practices for Websites with FilamentPHPNow that I understand how to use FilamentPHP for creating apps and backends, I need to create the frRelationship Manager for BelongsTo and HasMany RelationshipWhat I am trying to do: I have a Relationship between Users and Domains. I want to create a Relationcreate a Order in my orderline page i get a error that the method is undefinedwhen i create a OrderLine and then edit it and make a Order (inside the orderline) i get this error