Loading TOC...

MarkLogic 12 EA 1 Product Documentation
xdmp:privilege

xdmp:privilege(
   $action as xs:string,
   $kind as xs:string
) as xs:unsignedLong

Summary

Returns the privilege ID for the specified privilege name. Unlike the security library module function sec:uid-for-name , this function can be evaluated against any database and does not need to be evaluated directly against the security database. It returns the privilege ID from the security database configured for the database in which the App Server evaluates against.

Parameters
action A privilege action.
kind A privilege kind: "execute" or "URI".

Example

xdmp:privilege("http://my-app/test","execute")
=> 2392349873545

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