
sec.privilegeGetRoles( action as String, kind as String ) as Sequence
Returns a sequence of role names for the roles assigned to the
privilege ($action,$kind).
If a privilege with action equal to $action is not found, an error is
returned.
| Parameters | |
|---|---|
| action | The action URI for the privilege. If $kind is a URI privilege, then use the URI to protect for the action parameter. |
| kind | Either "execute" or "uri". |
http://marklogic.com/xdmp/privileges/privilege-get-roles
This function must be executed against the security database.
// execute this against the security database
declareUpdate();
const sec = require('/MarkLogic/security.xqy');
sec.privilegeGetRoles(
"http://marklogic.com/xdmp/privileges/create-role",
"execute")
=>
security
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.