Hi
I try to find a best way to implement this pattern. User Role + Data Segregation.
Suppose to have an entity invoice with IMustHaveCompany and Company entity.
My Goal is to create an access level for user to have specific function on single company
USER_A -> Admin Company 1 USER_B -> User Company 1
USER_A -> User Company_2 USER_B -> Admin Company_2
but if you ad another level like sales organization
| Company A |--| Sales Org 1 |--| Sales Org 2 | Company B |--| Sales Org 3 |--| Sales Org 4
we have more complex situation
- User 1 -> Admin Company A, implicty is Admin on Sales Org 1 and 2
- User 2 -> Admin Sales Org 1 and User In Sales Org 2
- User 3 -> Admin Sales Org 2 and User In Sales Org 1
- ....
How is the best way to implement this pattern?
The actual sales organization implementation is not able to do that. If I set my entity with OuOrganizationId (0001.0001 and roles) I cann't assinge a user role in organization unit....