Apply entity access

Hello ,   I have below questions wrt to Apply entity access in Mendix -  1) What do we have to consider about Apply entity access property if its not mentioned in a question ? This might be clear with my second question more . 2) Lets say, I have Customer and Administrator roles in my application. Customer have XPath at entity level given to it so that Customer can access his own orders only.  Administrator has full access on the Orders entity.   I have below data as per DB - Order Status               Customer Orders           Total Orders  Draft                                       1                                    20 Delivered                               1                                   1100 Paid                                        10                                 2000   Now I have one microflow who have input parameter as Customer. I have 2 activities in it, first one it Retrieve where I am retrieving [Status='Paid'] and then aggregating to find out count of orders.   What will be the count value for Administrator and Customer ?   Customer : 10 , Administrator : 2000 Customer : 2000 , Administrator : 2000 Customer : 10 , Administrator : 10   Let me know which option it would be and why ?   Thank you in advance.
1 answers


The correct option is: Customer: 10, Administrator: 2000.

This is because the Customer role is restricted by its XPath constraint to only see orders where it is the customer, whereas the Administrator role has unrestricted access to all orders, and here we are talking about  the paid ones so 2000.