Loading TOC...

MarkLogic 12 EA 1 Product Documentation
xdmp:document-get-permissions

xdmp:document-get-permissions(
   $uri as xs:string,
   [$output-kind as xs:string]
) as element(sec:permission)*|map:map*

Summary

Returns the permissions to a given document.

Parameters
uri The document URI.
$output-kind The output kind. It can be either "elements" or "objects". With "elements", the built-in returns a sequence of XML elements. With "objects", the built-in returns a sequence of map:map. The default is "elements".

Example

  xdmp:document-get-permissions("chapter5.xml")
  =>(<sec:permission>
          <sec:capability>read</sec:capability>
          <sec:role-id>324978243</sec:role-id>
        </sec:permission>,
        <sec:permission>
          <sec:capability>read</sec:capability>
          <sec:role-id>32493478578243</sec:role-id>
        </sec:permission>,
        <sec:permission>
          <sec:capability>update</sec:capability>
          <sec:role-id>32493478578243</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.