Situation at hand: We have a database with stored entities (reports) and we can display those reports in dataview. We’re already able to retrieve users according to their subclass. What we’re stuck in is how to retrieve specific kinds of subclasses according to the current user’s user role. I.E.: User role A can only see entity of subclass B and C. And so, our question: In a microflow attached to dataview, how does one restrict certain entity subclasses for only certain user roles? One user role would be able to see only certain kind of reports. Here’s what we tried so far: -Restricting user role access per entity via Security->Entity Access. It showed no change in display when attempted. -Using current user’s user role in exclusive split. This has not come far, as the user roles do not work with splits. -Setting up generalization of User, and attaching an entity with enumeration that can be used in display microflow. What we do not understand, is how to set it up on account creation, in accordance with user role (or at least without it).
How about associating the record with the role and then setting the xpath for the entity access to check if the role attached to the report record leads to the currentuser?
Via a microflow can work as well. Retrieve the userroles by retrieve from database action where the xpath is id=role (where the role is available as a keyword). Then retrieve the roles for the currentuser and check the retrieved roles against this list to retrieve the records the user has the role for. Combine these in a new lsit to be able to return the complete list if multiple roles apply to the user.
Hope these suggestions will help you in finding a solution.
Erwin 't Hoen
If you have set up the entity access rules in your domain module, you need a additional setting on your datasource microflow which retrieves the objects: