MarkLogic 12 EA 1 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>
    
Powered by MarkLogic Server | Terms of Use | Privacy Policy