Loading TOC...


   $action as String,
   $kind as String
) as element(sec.privilege)?


Returns a sec:privilege element corresponding to a privilege identified by ($action,$kind). If no such privilege is found, an error is returned.

$action Action protected by this privilege. For an Execute Privilege, this is usually a URI describing an activity. For a URI Privilege, this is a base URI used to filter database activities with certain document URIs.
$kind Either "execute" or "uri".

Usage Notes

This function must be executed against the security database.


// execute this against the security database
// There is no JSON output for this function.

const sec = require('/MarkLogic/security.xqy');



<sec:privilege xmlns:sec="http://marklogic.com/xdmp/security">

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.