MarkLogic 9 Product Documentation
xdmp.nodePermissions

xdmp.nodePermissions(
   node as Node,
   [output-kind as String]
) as Object[]

Summary

Returns the permissions to a node's document.

Parameters
node The node.
output-kind The output kind. It can be either "objects" or "elements". With "objects", the built-in returns an array of objects. With "elements", the built-in returns an array of XML element nodes. The default is "objects".

Usage Notes

If the URI passed in doesn't exist, an empty array is returned.

Example

  xdmp.nodePermissions(cts.doc("chapter5.json"))
  =>
  [
    {
      "permission" : {
        "capability" : "read",
        "roleId" : "324978243"
       }
    },
    {
      "permission" : {
        "capability" : "read",
        "roleId" : "32493478578243"
      }
    },
    {
      "permission" : {
        "capability" : "update",
        "roleId" : "32493478578243"
      }
    }
  ]
Powered by MarkLogic Server | Terms of Use | Privacy Policy