Asigning role to existant user on Team
New battle against Roles. Using this plugin to create roles + permissions and associate role to user. (https://filamentphp.com/plugins/tharinda-rodrigo-spatie-roles-permissions)
When associating role to User I've got this message. Note that I've add team_id foreign on role, permission and model_has_roles + model_has_permissions table to make all Tenant + Roles + Permissions working with users
Filament
Spatie Roles Permissions by Tharinda Rodrigo - Filament
Filament support for
spatie/laravel-permission
.4 Replies
Is there a way to associate manually current team_id for this insert?
I will look into this matter over the weekend.
Thank you so much @tharindarodrigo
@kerchack_ast Does this happen within your UserResource when you try to attach Role to the user?
Probably using the following?