sec.userGetRoles( user-name as String ) as Sequence
Returns a sequence of role names for the roles directly assigned to the
user ($user-name). Does not flatten the roles to include "inherited
roles."
If a user with name equal to $user-name is not found, an error is
returned.
Parameters | |
---|---|
user-name | The name of a user. |
http://marklogic.com/xdmp/privileges/user-get-roles
This function must be executed against the security database.
// execute this against the security database const sec = require('/MarkLogic/security.xqy'); sec.userGetRoles("Jim") => Developer admin admin-builtins
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.