sec.addQueryRolesets( qrss as element(sec.queryRolesets)[] ) as Sequence
This function adds query rolesets to the Security database.
Parameters | |
---|---|
qrss | Query rolesets to be added |
http://marklogic.com/xdmp/privileges/add-query-rolesets
This function must be executed against the Security database.
// 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
// 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