MarkLogic 9 Product Documentation
xdmp.permissionxdmp.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"
}
Copyright © 2024 MarkLogic Corporation. MARKLOGIC is a
registered trademark of MarkLogic Corporation.