retrieving a list of object only if the user role is employee

0
so, i want to retrieve a list of all the product objects in the database, but only is the users role is employee. if the users role is supplier, i want to retrieve a list of products which are made by that account. how do i do this? im thinking of doing it in the xpath but have no idea how. thanks in regards!
asked
2 answers
1

If the role is supplier, and a supplier is only allowed to view products create by an account with supplier role, you can add a xpath constraint to the entity acces of product entity. The entity access should contain an xpath to [%CurrentUser%] over the association in which the ownership is stored.

answered
0

Make a microflow datasource. In the microflow check the user role of the current user and split to do the different retrieves. The output of the microflow should be a list.

Regards,

Ronald

answered