
sec:role-get-roles( $role-name as xs:string ) as xs:string*
Returns a sequence of role names for the roles directly assigned to the given role ($role-name).
| Parameters | |
|---|---|
| role-name | The name of a role. | 
http://marklogic.com/xdmp/privileges/role-get-roles
  If a role with name equal to $role-name is not found, an error is returned.
If a role is assigned to itself, the sequence returned from
	  sec:role-get-roles does not include itself.
To find all of the roles this role inherits (that is, the
  roles assigned directly to this role, the roles assigned to those 
  roles, and so on), use the xdmp:role-roles built-in
  function.
This function must be executed against the security database.
(: execute this against the security database :)
 xquery version "1.0-ml";
import module namespace sec="http://marklogic.com/xdmp/security" at 
    "/MarkLogic/security.xqy";
   
sec:role-get-roles("Developer")
=>
filesystem-access
pipeline-execution
   
  
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.