Filament Shield role relation question
This feels like a basic question since I'm learning filament v3 but I just installed https://github.com/bezhanSalleh/filament-shield and I'm trying to figure out, how do I attach resources to the edit role page? Feels like i am missing something basic but the docs don't give me much guidance.
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
- GitHub - bezhanSalleh/filament-shield: Th...
8 Replies
Can you explain more, base on image you have 'User' and 'Role' resources and both are displayed..
@valpuia wow, i just realized how simple the issue is. I didn't realize every model I wanted to manage within the roles page needed to have a resource attached to it. I just made a new resource and it's showing up there.
Is there a way to add a model without a resource?
Shield allows custom permission but they would end up under their own tab
Just create a policy for your model without resource..
Ah I was hoping it would be more seamless integration but that's understandable
you can simply run the following command after creating resource
this will automatically create the policy for you resource.
I'm using Filament Shield for role management, but I encountered an issue when trying to apply Shield permissions to a relation manager. Some actions within the relation manager need to be restricted based on user roles.
Has anyone faced this before or found a good way to handle it?
IT depends if you are using tenants, relations should be limited and if you have a resource and a relation they would need access to the resource since it's model based.