Multi level user hierachy - Privacy rules & Database

Hey forum,

What is the best way to setup the database and privacy rules for a multi level user hierachy. Something you would see in a lot of Saas that deal with employee data.

So let’s say a user (developer) has a manager (team-lead), that manager has a manager (head of development) as well, which might also have a manager(coo) and so on. I want the privacy rules to be set up in a way that for every level you go up, you have access to the levels below as well.

Let’s say, Manager A is the manager of Manager B. Manager A should be able to see the details of all the data related to the direct reports of Manager B. And I don’t mean only User data, but also things like for example Projects. Be able to see all the projects created by Manager B’s direct reports.

Have been struggling with finding the right setup for this, in a way that it can cover however many levels there are in the hierachy.

Anyone got a good suggestion, or struggled with the same thing in the past?

Thanks!

1 Like