Loading TOC...

MarkLogic Server 11.0 Product Documentation
sec:get-role-names

sec:get-role-names(
   $role-ids as xs:unsignedLong*
) as element(sec:role-name)*

Summary

Returns sequence of unique sec:role-name's that corresponds to the sequence of role IDs $role-ids. Duplicate IDs return a single name.

Parameters
role-ids A sequence of role IDs.

Required Privileges

http://marklogic.com/xdmp/privileges/get-role-names

Usage Notes

If a role ID in $role-ids does not correspond to an existing role, an error is returned.

This function must be executed against the security database.

Example


(: execute this against the security database :)
xquery version "1.0-ml";
import module namespace sec="http://marklogic.com/xdmp/security" at 
    "/MarkLogic/security.xqy";
   
sec:get-role-names((6629014463670416824, 6615337390848046012)) 
=>

<sec:role-name xmlns:sec="http://marklogic.com/xdmp/security">editor</sec:role-name>
<sec:role-name xmlns:sec="http://marklogic.com/xdmp/security">writer</sec:role-name>  
  

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