Hello guys,
I want to create a solutions, consisting of Contact, Web Roles and some other custom tables: Company, Company Relationship, Org Type,... to control the displaying of data record.

Let say I have 5 companies:
+ Company 1 (Level1) manages Company 2(Level2), Company 3(Level2)
+ Company 4 (Level1) manages Company 5 (Level2)
I have 2 Web Roles:
+ Super Role: Can see everything.
+ Level 1: Contact in Company Level1 will have WebRoles: Level1
+ Level 2: Contact in Company Level2 will have WebRoles: Level2
I have Post table, which contains the data made by user, which is in Contact table. So I want to restrict the data record permission, the management company (Ex: Company1) can see Post made its self, or made by its subordinators (Ex: Company 2, And Company 3), like:
+ User Company 1 can only see data made by Company 1, Company 2 , Company 3. But Company 2 , Company 3 can not see data of Company 1
+ User Company 4 can only see data made by Company 4, Company 5, Company 3. But Company 5 can not see data of Company 2
How can I actually implement this?
Thank you!!