Saving the data per logged in user

0
In my application, I have used auth0 for login/logout solution.  Each logged in user fetches some data from some REST API and do further operation on that data. This data is need to be saved temporarily in DB for some purpose. But if in the mean time, some other user starts using this app from different browser, he is able to see the saved data (i.e. data ehich first user has saved). Can we associate the saved data with logged in user so that user will see the corresponding data, and we can delete the data once user is logged out?  
asked
1 answers
1

Yes, you can. You have to add an association for this from the entity the data is saved in to the user entity (or enable the ‘Store owner’ option in the properties of the entity). You can then create an entity access rule in the properties of the entity the data is saved in, in such a way that a user can always only see the data that is associated to itself.

You have to use an XPath constraint for this, see https://docs.mendix.com/howto/logic-business-rules/define-access-rules-using-xpath for more information.

answered