xdmp.databaseNodeQueryRolesets( nodes as Sequence, [options as String[]] ) as Sequence
Return a sequence of query-rolesets that are required for proper querying of the given database nodes with Element Level Security.
http://marklogic.com/xdmp/privileges/database-node-query-rolesets
"Nodes" is a sequence of database nodes. If an array is passed in, it will be treated as one array node. Use Sequence.from to convert an array of nodes to a sequence of nodes when necessary.
If neither "all" nor "unconfigured" is present, it defaults to "all".
xdmp.databaseNodeQueryRolesets( fn.doc("/example.json"), ["new"])