MarkLogic 12 EA 1 Product Documentation
sec.addQueryRolesets

sec.addQueryRolesets(
   qrss as element(sec.queryRolesets)[]
) as Sequence

Summary

This function adds query rolesets to the Security database.

Parameters
qrss Query rolesets to be added

Required Privileges

http://marklogic.com/xdmp/privileges/add-query-rolesets

Usage Notes

This function must be executed against the Security database.

Example


 // execute this against the Security database 
declareUpdate(); 
const sec = require('/MarkLogic/security.xqy');
	  
const roleset = sec.queryRolesets(sec.queryRoleset("els-role-2"));
sec.addQueryRolesets(roleset)
=>
11752102537381923938


Example


// execute this against the Security database 
declareUpdate();
const sec = require('/MarkLogic/security.xqy');
	  
const roleset1 = sec.queryRoleset("els-role-1");
const roleset2 = sec.queryRoleset("els-role-2");
sec.addQueryRolesets(sec.queryRolesets([roleset1,roleset2])) 
=>
12187562349380762165
    
Powered by MarkLogic Server | Terms of Use | Privacy Policy