Check userrole in microflow

4
What (XPath??) expression can I use in an exclusive split (in a microflow) to check if a user has a specific userrole?
asked
2 answers
3

I guess the only way is first to retrieve the userroles of the users and then iterate over the retrieved userroles to see if the description of one of them matches the description of the userrole you want to check, so $Iterator/Name = 'Manager'.

Use a variable of type boolean to check whether one of the roles was present

answered
1

You can use the [%UserRole_User%] constant. For each role you've got a corresponding constant. So if you want to check for the user role ‘OrderAdmin’ you can use this expression: 

[id = '[%UserRole_OrderAdmin%]']

 

answered