Hello everyone, how is it going? Just got here!
I'm attempting to model my usecase but I'm having some trouble finding a solution.
Basically, my use case consists of permissions, but these permissions might have a scope. For example: We have organizations, employees and teams. An employee may be part of a team and also part of an organization. An administrator of a given organization will have the option to give a particular employee the permission to view all employees in an organization. It may also give another employee the permission to view only employees of the same team. And we want the administrator to mix and match these permissions as much as it likes (we will have a bunch of permissions like that)
Is there a suggested schema to achieve this?