Users, Roles, and Security Groups Management - How to Set up a Downline

So, I have a specific setup and I’ve looked through and read lots of documentation and tried my best to wrap my head around how SuiteCRM does this.

Outside of the very difficult solution I came up with, how would one correctly implement the following scenario:

Let’s say I have a tree like so:

We’ll number these rows for the sake of understanding: 1, 2, 3 and 4. Then we have Administrators who are employees to throw into the mix.

Administrators can work with almost all records except working with workflows, mess with code, or mess with a few custom modules, outside of that, they have very few restrictions and don’t obey any of the rules of the downline.

Then we follow the downline:

Person 1’s can see all Person 2’s, 3’s, and 4’s that are specifically within their downline and within their Territory. They cannot see any other Person 1’s period. They cannot see any 2’s, 3’s, and 4’s that aren’t within their downline or their Territory. They also cannot see Administrators or anything assigned to them.

Person 2’s can see all Person 3’s and 4’s within their specific Downline and Territory, They cannot see any Person 1’s or 2’s period. They cannot see any Person 3’s or 4’s outside of their Territory or Downline. They also cannot see Administrators or anything assigned to them.

Person 3’s can see all 4’s within their specific Downline and Territory, They cannot see any Person 1’s, 2’s, or other 3’s period. They cannot see any Person 4’s outside of their Territory or Downline. They also cannot see Administrators or anything assigned to them.

Person 4’s can see only records assigned to them.

In this example there is only 4 deep, in the real world, there is actually 12 deep plus administrators plus me, the Super Admin.

How can I go about resolving this?

I can’t directly help you with this, I don’t fully understand these things either, but I can point you to the resource that helped me the most:

https://www.sugaroutfitters.com/docs/securitysuite/example-of-a-typical-setup

That does what you need, I think, but with fewer levels. I wonder if you can expand it to meet your needs.