How do I set the privilege for set-session-field() function in MarkLogic for the application user? I cannot seem to find this information in the MarkLogic documentation and I currently get the following error when I try to use this function:
SEC-PRIV: xdmp:set-session-field("myfield", "myvalue") -- Need privilege: http://marklogic.com/xdmp/privileges/xdmp-set-session-field in /my_xquery_file.xqy, at 48:6 [1.0-ml]
thx
p.s. Got this one: OK, for anyone else who needs this information, I found it in the MarkLogic doc "Understanding and Using Security Guide" on page 28. Open the MarkLogic admin panel in your browser; Go to Configure->Security->Execute Privileges; Scroll down to find the function/privilege you want to grant and click on the specific function/privilege. In the next screen, check the app-user if you want your xquery scripts to execute the function. My app can now store data in user sessions (set-session-field privilege).