Use This Package for Pivot Table #1778
-
I have many-to-many relationship (user-team), so a user can join multiple teams and a team can have multiple users, at first I was adding permissions only in team model, but I need to add it in team-user pivot table through this package, so a user can have different permissions for each team he has joined ? Any Ideas how can I achieve this. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 2 replies
-
facing same kind of issue .. |
Beta Was this translation helpful? Give feedback.
-
Crude, and early, but I have the same situation. I created a "teamAccess" model/table to store the roles. I check the active team (team ID 1) stored on the User table, then going through the team, I find the teamAccess where team_id = user_active_team_id User Model: Then I have a Policy with a condition: Might get you somewhere... |
Beta Was this translation helpful? Give feedback.
-
Hi @annis-souames, did you figure out the solution ? |
Beta Was this translation helpful? Give feedback.
-
I'm working on something similar deciding between this package or creating something custom... Could this be handled with subparts?
You would specify the wanted team_ids |
Beta Was this translation helpful? Give feedback.
-
@annis-souames @bhushan @sys-auditing @Hesesses @brandon-9 |
Beta Was this translation helpful? Give feedback.
-
discussions 1782 |
Beta Was this translation helpful? Give feedback.
discussions 1782
That's my solution, it's not the best way to do it, but it's been working for me for years.