Loading TOC...


   $uri as String,
   $root as Node,
   [$insert-options as Object?],
   [$options as String[]]
) as Sequence


Return a sequence of query-rolesets that are required for proper querying with Element Level Security if the node is inserted into the database with the given document-insert options. A typical workflow calls this function and adds each query-rolesets through the sec:add-query-rolesets function before inserting the document into the database so that the document can be correctly queried with Element Level Security as soon as it is inserted.

$uri The URI to be used when the document is inserted later.
$root The root node. The root node can be an element node, an object node or an array node.
$insert-options Options from the xdmp.documentInsert function.
$options Other options. The default is ().

Options include:

Return all query-rolesets, even if they are already configured.
Return only those query-rolesets that are not configured.

Required Privileges


Usage Notes

If neither "all" nor "unconfigured" is present, it defaults to "unconfigured".


    "/example.json", {"foo":"aaa"}, null, ["new"])


     {"permissions" : xdmp.documentGetPermissions("foo.json")})

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