
sem.graphSetPermissions( graph as sem.iri, permissions as Object[] ) as null
Set permissions to the graph specified. The user must have update permissions on the graph.
This function is a built-in.
var sem = require('/MarkLogic/semantics'); 
sem.graphSetPermissions((sem.iri("graphs/MyDemoGraph")),
(
    xdmp.permission( "demo-reader", "read" ),
    xdmp.permission( "demo-writer", "update"  )
  )
 )
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.