Loading TOC...

MarkLogic Server 11.0 Product Documentation
sec.queryRoleset

sec.queryRoleset(
   role-names as String[]
) as element(sec.queryRoleset)

Summary

This function creates a query roleset that can be passed into a function used to add or remove rolesets.

Parameters
role-names Names of the roles to be included in the roleset.

Usage Notes

This function must be executed against the Security database.

Example


 // execute this against the Security database 
 
const sec = require('/MarkLogic/security.xqy');

sec.queryRoleset("els-role-2");
=>
<queryRoleset xmlns="http://marklogic.com/xdmp/security">
  <role-id>12006351629398052509
  </role-id>
</queryRoleset>
    

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