Team : unable to extend a global role by a team #1994
-
Hi, I've been searching for someone talking about that but i haven't found anything, so here is my use case. I have a set of global roles that i use as the default roles for creating a team. But the only difference between the global role and the one in the team would be the team id. The database allows that because the contraint enforces a unique composition of team_id/name/guard_name, but the
Am i wrong in my understanding or is this an issue? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Global roles must be uniques by name and guard_name, if a composition of name/guard_name exists as global, you cant duplicate it on a team |
Beta Was this translation helpful? Give feedback.
-
Hi @erikn69, thanks for the answer. I see how it works but i can't find a justification of this behavior. There are only two places where that constraint is enforced in the code so i'm going to test if by extending those parts everything still works.
The only change is that i removed the |
Beta Was this translation helpful? Give feedback.
-
Found a more elegant solution so i don't have to extend spatie source code. I set a |
Beta Was this translation helpful? Give feedback.
Found a more elegant solution so i don't have to extend spatie source code. I set a
team_id
to0
on my "global" roles. Might answer all my needs 👍