Replies: 1 comment
-
It sounds possible, it is a polymorphic relationship |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
This is my first project and the first time i'm using the spatie permissions package.
I've read the documentation multiple times and i'm still confused and facing a problem.
I am working on a project with the following structure:
(Filament) panels:
All users have a personal team (a private team/tenant).
A personal team can only have roles and nothing more.
So i assign the Global Admin role to one's personal team and that's how he can access the admin panel.
In order to be able to use the app/software, one must be in a 'public' team so he or she can access the team resources and data in the app panel.
So app data (example, a social media account) is always linked to a team so that the entire team can manage (the social media account) data.
I have three types of roles:
So basically the team should access certain features based on the package that the team has subscribed to.
Up until now i was able to assign roles to team members and was able to verify whether a user has access to a permission for the team/tenant using setPermissionTeamId.
But doing something like $team->can('use function') is impossible because the team cannot use 'can' it says.
How can i assign roles to the entire team rather than one team member?
I would love to use this package but is it possible within the structure im working on?
Or are there better aproaches/structures for the same goal?
Would love to get some advice on this.
Beta Was this translation helpful? Give feedback.
All reactions