I order to access the Account entity, you will need to create an association between the account entity and all other entities where you want to create the access rules. Once the entity has an association, you will be able to access the same in the XPath
Do you want to restrict access to the account entity or data of another entity?
The account entity data is already constraint with: [id='[%CurrentUser%]']
If you want to constrain other data for example; only access to MY OWN orders, you need have 2 options
I’ve created a specific entity for the tenancy in my project.
That entity is associated with the account extension and all the other main entities.
Let’s say that an account is associated to a specific department, and the department is associated with specific Customers.
The access rule xpath in Customer entity would be:
Customer_Department/Department/Department_Account = [%CurrentUser%]
If you have a sub entity, you can use the main entity for access rule:
Order_Customer/Customer/Customer_Department/Department/Department_Account = [%CurrentUser%]
This way the account will get the data associated to the specific department.
You can also associate multiple departments to the account.
I found a workaround:
Associated the relevant entity to the new account entity and went the whole way around from the to-be-restricted entity over the key entity to the account entity and comparing its id to ‘[%CurrentUser%]’