Loading TOC...

xdmp.hasPrivilege

xdmp.hasPrivilege(
   $privileges as String[],
   $kind as String
) as Boolean

Summary

Tests whether the current user has at least one of a given set of privileges. Returns true if they do, false otherwise.

Parameters
$privileges The set of privilege URIs. These are the URIs for the privileges, not the names of the privileges.
$kind The kind of privileges (either "execute" or "uri").

Example

xdmp.hasPrivilege("http://myprivs/function-foo", "execute");
=> true if the current user has the execute privilege on a
   privilege with the URI "http://myprivs/function-foo"

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy