Spatie Roles & Permissions - Global
Hi,
I'm trying to utilise roles & permissions in my multi-tenancy Filament app, have it all working pretty nicely, but the issue is I have to create roles on each tenancy. I instead wish to have roles defined at a global level, so I only have to create a role once, but can then allocate it to user based on tenancy. For example, User1 is a standard user on Tenant1 and a privileged user on Tenant2. User 2 only has standard user on Tenant2 and no access to any other tenants.
I've created a global role to test it (where the team_id is left null), and whilst I can go in to a user and assign them to this global role, the global role does not show in the list of roles to be able to manage in the app. How can I get these roles into the table in the app, and allow them to be edited without having to do it direct in the database?
I'm trying to utilise roles & permissions in my multi-tenancy Filament app, have it all working pretty nicely, but the issue is I have to create roles on each tenancy. I instead wish to have roles defined at a global level, so I only have to create a role once, but can then allocate it to user based on tenancy. For example, User1 is a standard user on Tenant1 and a privileged user on Tenant2. User 2 only has standard user on Tenant2 and no access to any other tenants.
I've created a global role to test it (where the team_id is left null), and whilst I can go in to a user and assign them to this global role, the global role does not show in the list of roles to be able to manage in the app. How can I get these roles into the table in the app, and allow them to be edited without having to do it direct in the database?