Xpath Contraints

0
Hi, I have created a leave form, where students can apply for leave. Now, if u login student 1 only his leave form should be shown. How would I achieve that?
asked
3 answers
0

Hi ,

Try to show leave form to student as per their RegisteredNumber.In Xpath also try to use attribute RegisteredNumber.

answered
0

Hi,

in Xpath of your Data Grid you can say that only the ones related to the current user should be displayed. For that you should refer to the association between your entity and the student.

It should be something like this:
[MyFirstModule.Leave_Account/MyFirstModule.Account/id='[%CurrentUser%]']

answered
0

Please note that specifying an xpath in the datagrid does not provide a secure way of hiding the leave forms of other users. Even if the leave forms from other users may be hidden in that way, users with technical knowledge can still retrieve the leave forms of all students.

The secure way of restricting access is through entity access: https://docs.mendix.com/howto/logic-business-rules/define-access-rules-using-xpath#3-defining-the-access-rules-on-the-order-entity-using-xpath 

answered