MarkLogic 12 EA 1 Product Documentation
sec:role-get-roles

sec:role-get-roles(
   $role-name as xs:string
) as xs:string*

Summary

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.

Required Privileges

http://marklogic.com/xdmp/privileges/role-get-roles

Usage Notes

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.

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";
   
sec:role-get-roles("Developer")
=>

filesystem-access
pipeline-execution
   
Powered by MarkLogic Server | Terms of Use | Privacy Policy