sec.roleGetRoles( role-name as String ) as Sequence
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 const sec = require('/MarkLogic/security.xqy'); sec.roleGetRoles("Developer") => filesystem-access pipeline-execution