Loading TOC...

sec:add-query-rolesets

sec:add-query-rolesets(
   $qrss as element(sec:query-rolesets)*
) as xs:unsignedLong*

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 :)
 
xquery version "1.0-ml"; 
import module namespace sec = "http://marklogic.com/xdmp/security" 
      at "/MarkLogic/security.xqy";
	  
let $roleset := sec:query-rolesets(sec:query-roleset("els-role-2"))
return
sec:add-query-rolesets($roleset)
=>
11752102537381923938


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";
	  
let $roleset1 := sec:query-roleset("els-role-1")
let $roleset2 := sec:query-roleset("els-role-2")
return
sec:add-query-rolesets(sec:query-rolesets($roleset1,$roleset2))
=>
12187562349380762165
    

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