MarkLogic Server 11.0 Product Documentation
sem:graph-remove-permissions

sem:graph-remove-permissions(
   $graph as sem:iri,
   $permissions as element(sec:permission)*
) as empty-sequence()

Summary

Remove permissions from the graph specified. The user must have update permissions on the graph.

This function is a built-in.

Parameters
graph The graph IRI.
$permissions Security permission elements corresponding to the permissions for the document. If not supplied, the current user's default permissions are applied. The default value used for $permissions can be obtained by calling xdmp:default-permissions(). A document that is created by a non-admin user (that is, by any user who does not have the admin role) must have at least one update permission, otherwise the creation will throw an XDMP-MUSTHAVEUPDATE exception.

Example

xquery version "1.0-ml";
import module namespace sem = "http://marklogic.com/semantics" 
      at "/MarkLogic/semantics.xqy";
	  
let $perms := xdmp:default-permissions("graphs/MyDemoGraph2")
return 
sem:graph-remove-permissions(sem:iri("MyGraph"),($perms))

Powered by MarkLogic Server | Terms of Use | Privacy Policy