Sorting the data using XPath

0
Hello Everyone, I’ve created an application Document Management System. and the issue is that when a user uploads any document it is visible to all other users also. Can anyone help me and tell me how to display the documents according to its owner?  and since I’ve created my own login page, the ‘[%CurrentUser]’ variable is not working.
asked
3 answers
0

You can link the filedocument(or preferably a generalization of it) to the account entity with an association. When you create the filedoc you need to set this association.Then either with entity acces or an xpath constrained on the page you can set the constrianed to: filedocument_Account = [%CurrentUser]. This way the user can only see its own documents

answered
0

In addition to Maarten;

please question yourself; is the user only allowed to view its own documents (1) or is the user allowed to see all documents, but on this particular page displays only the user own document. (2)

This will define where to add the XPath

(1) Security

(2) Page

answered
0

Follow this learning path: https://gettingstarted.mendixcloud.com/link/module/35/lecture/326

This will tell you how to use Access Rules and XPath to constrain the documents so it will only show the documents of the user.

Regards,

Ronald

 

answered