bezhanSalleh / filament-shield

The easiest and most intuitive way to add access management to your Filament Admin Resources, Pages & Widgets through `spatie/laravel-permission`

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple resources use the same model

ThomasTechmere opened this issue · comments

I have multiple resources that use the same model, but the permissions are based on models.

I have for example a service model that is used for AcceptedServiceResource and CanceledServiceResource.

I would like for the super admin to just see them both but a filament_user should only see the AcceptedServiceResource. is this possible?
or do i have to customize the structure of spatie underneath?

Looking further it does create permission based on the named so i do have the permissions:
create_canceled::service and create_accepted::service but if i deselect that for example you can create canceled services it removes it from the role_has_permission table but you can still create a service as that role?

not even possible within laravel itself let alone filament. Extend the model itself and then create resources for each one.