How to divide data to different roles?

0
I mean different data need to show different roles.  Administrator could have acess to all data, but different company account only have access to his own data.  PS: I have set different roles to different companies, and the account login in the system, it has company property.   So how to solve this problem?  
asked
2 answers
1

Hi Yi Li,

What you can do is, you can enable the owner in the entity properties and then,

image.png

in the access rules, you can set the Xpath to Path to Owner for the CompanyUser and other USER.

This way, each company who created their Product can only see their own.

image.png

And For the Admin, you can create seperate access rule which does not have this path to owner settings.

Hope it helps!!

answered
0

The best way is to define access rules using XPATH on entity.

Please refer to: Defining Access Rules Using XPath | Mendix Documentation

answered