sem.graphGetPermissions( graph as sem.iri, [format as String] ) as Object[]
Get permissions to the graph specified. The user must have read permissions on the graph.
This function is a built-in.
var sem = require('/MarkLogic/semantics'); sem.graphGetPermissions(sem.iri("PlayerGraph")) => [ { "capability": "read", "roleId": "5995163769635647336" } , { "capability": "update", "roleId": "5995163769635647336" } ] //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.