<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/sem.graphRemovePermissions.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>sem.graphRemovePermissions</api:function-name><api:suggest>sem.graphremovepermissions</api:suggest><api:suggest>sem</api:suggest><api:suggest>graphremovepermissions</api:suggest><api:function-link mode="xquery" fullname="sem:graph-remove-permissions">/apidoc/8.0/sem:graph-remove-permissions.xml</api:function-link><api:function mode="javascript" name="graphRemovePermissions" type="builtin" lib="sem" category="Semantics" hidden="false" bucket="MarkLogic Built-In Functions" prefix="sem" namespace="http://marklogic.com/semantics" fullname="sem.graphRemovePermissions"><api:summary>
  Remove permissions from the graph specified.
  The user must have update permissions on the graph.
  <p xmlns="http://www.w3.org/1999/xhtml">This function is a built-in.</p>
</api:summary><api:params><api:param name="graph" type="sem:iri"><api:param-description>
    The graph IRI.
  </api:param-description><api:param-name>graph</api:param-name><api:param-type>sem.iri</api:param-type></api:param><api:param class="javascript" name="permissions" type="Object[]"><api:param-description>
    Security permission objects 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.defaultPermissions(). A document that is
    created by a non-admin user (that is, by any user who does not have the
    <code xmlns="http://www.w3.org/1999/xhtml">admin</code> role) must have at least one update permission,
    otherwise the creation will throw an <code xmlns="http://www.w3.org/1999/xhtml">XDMP-MUSTHAVEUPDATE</code>
    exception.
  </api:param-description><api:param-name>permissions</api:param-name><api:param-type>Object[]</api:param-type></api:param></api:params><api:return>null</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
declareUpdate();
var sem = require('/MarkLogic/semantics');
var perms = xdmp.defaultPermissions("graphs/myDemoGraph");

sem.graphRemovePermissions(sem.iri("MyGraph"), perms);

</pre></api:example></api:function></api:function-page>