<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.hasPrivilege.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.hasPrivilege</api:function-name><api:suggest>xdmp.hasprivilege</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>hasprivilege</api:suggest><api:function-link mode="xquery" fullname="xdmp:has-privilege">/apidoc/8.0/xdmp:has-privilege.xml</api:function-link><api:function mode="javascript" name="hasPrivilege" type="builtin" lib="xdmp" category="Security" hidden="false" bucket="MarkLogic Built-In Functions" prefix="xdmp" namespace="http://marklogic.com/xdmp" fullname="xdmp.hasPrivilege"><api:summary>
  Tests whether the current user has at least one of a given set of privileges.
  Returns true if they do, false otherwise.
</api:summary><api:params><api:param name="privileges" type="xs:string*"><api:param-description>
    The set of privilege URIs.  These are the URIs for the privileges, not
    the names of the privileges.
  </api:param-description><api:param-name>privileges</api:param-name><api:param-type>String[]</api:param-type></api:param><api:param name="kind" type="xs:string"><api:param-description>
    The kind of privileges (either "execute" or "uri").
  </api:param-description><api:param-name>kind</api:param-name><api:param-type>String</api:param-type></api:param></api:params><api:return>Boolean</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
xdmp.hasPrivilege("http://myprivs/function-foo", "execute");
=&gt; true if the current user has the execute privilege on a
   privilege with the URI "http://myprivs/function-foo"
</pre></api:example></api:function></api:function-page>