Loading TOC...

xdmp:permission

xdmp:permission(
   $role as xs:string,
   $capability as xs:string,
   [$output-kind as xs:string]
) as element()|map:map

Summary

Returns a permission element in the security namespace corresponding to the named role and capability given.

Parameters
role A role name.
capability A capability (read, update, insert, or execute).
$output-kind The output kind. It can be either "element" or "object". With "element", the built-in returns an XML element. With "object", the built-in returns a map:map. The default is "element".

Example

  xdmp:permission("development", "read")
  =><sec:permission>
          <sec:capability>read</sec:capability>
          <sec:role-id>32497824353</sec:role-id>
       </sec:permission>

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