
sem:graph-get-permissions( $graph as sem:iri, [$format as xs:string] ) as element(sec:permission)*
Get permissions to the graph specified. The user must have read permissions on the graph.
This function is a built-in.
xquery version "1.0-ml";
import module namespace sem = "http://marklogic.com/semantics"
at "/MarkLogic/semantics.xqy";
sem:graph-get-permissions(sem:iri("PlayerGraph"))
=>
<sec:permission xmlns:sec="http://marklogic.com/xdmp/security">
<sec:capability>read</sec:capability>
<sec:role-id>5995163769635647336</sec:role-id>
</sec:permission>
<sec:permission xmlns:sec="http://marklogic.com/xdmp/security">
<sec:capability>update</sec:capability>
<sec:role-id>5995163769635647336</sec:role-id>
</sec:permission>
(: the role ID 5995163769635647336 has read and update capability on this graph :)
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.