- Install Nuxeo 9.3
- In Modeler, create a custom document type
- In the Designer create custom forms
- In the forms add the following:
User:[[user]]<br> currentUser:[[currentUser]]<br> <nuxeo-filter user="[[user]]" expression="user.isAdministrator"> this user is admin </nuxeo-filter><br> <nuxeo-filter user="[[user]]" expression="!user.isAdministrator"> this currentUser is NOT admin </nuxeo-filter> <nuxeo-filter user="[[currentUser]]" expression="currentUser.isAdministrator"> this currentUser is admin </nuxeo-filter><br> <nuxeo-filter user="[[currentUser]]" expression="!user.isAdministrator"> this currentUser is NOT admin </nuxeo-filter>
- Log in as Administrator
- Sync the project with the server
- Click the + button to create a document
- Observe this does not display any value for user or currentUser (see createForm.png)
- Observe all the messages are displayed: this user is admin, this user is NOT admin, this currentUser is admin, this currentUser is NOT admin (see createForm.png)
Expected behavior : user or currentUser should be valued and only the nuxeo-filter bloc for the admin should be displayed.