Loading TOC...

MarkLogic Server 11.0 Product Documentation
xdmp.permission

xdmp.permission(
   role as String,
   capability as String,
   [output-kind as String]
) as Object|Element

Summary

Returns a permission object corresponding to the named role and capability given.

Parameters
role A role name.
capability A capability (read, update, node-update, insert, or execute).
output-kind The output format. Allowed values: "element" or "object". The default format is "object" (JSON object). When you set this parameter to "element", this function returns an XML element node, suitable for inclusion in contexts that require permissions expressed as XML.

Example

  xdmp.permission("development", "read")
  =>
  {
    "capability" : "read",
    "roleId" : "32497824353"
  }

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.