Loading TOC...

MarkLogic 9 Product Documentation
xdmp.role

xdmp.role(
   role as String
) as (Number|String)

Summary

Returns the role ID for the specified role 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 role ID from the security database configured for the database in which the App Server evaluates against.

Parameters
role A role name.

Example

xdmp.role("editor");
=> 2392349873545

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