bezhanSalleh / filament-shield

The easiest and most intuitive way to add access management to your Filament Admin Resources, Pages & Widgets through `spatie/laravel-permission`
MIT License
1.35k stars 166 forks source link

Role Resource is accessible for everyone #367

Closed jals-es closed 3 months ago

jals-es commented 3 months ago

Hi, there are problems with the permissions of RoleResource because it's accesible for everyone without having role or if his role doesn't have role permissions.

Captura de pantalla 2024-04-16 a las 12 48 53
jals-es commented 3 months ago

As I can see, I have this role permisons on resources tabs:

Captura de pantalla 2024-04-16 a las 12 51 51

But if I active custom permisions I can see this other shield permissions:

Captura de pantalla 2024-04-16 a las 12 51 58

I think the permissions are duplicated.

bezhanSalleh commented 3 months ago

If you don't run the fresh flag when you you publish or change a resource's namespace new roles will be generated.

PLGUPICTO commented 3 months ago

@bezhanSalleh I have similar problem after composer update upgraded it to 3.2.4. I reverted back to 3.2.1 and it doesn't have the problem. I haven't publish or change resources.

flightepic commented 3 months ago

same issue here

dominikgeimer commented 3 months ago

I also have the same issue on a fresh Laravel app.

bezhanSalleh commented 3 months ago

Try #372 n let me know

dominikgeimer commented 3 months ago

Yes, it works. It fixed the problem for me! Thank you!