sec.getRoleIds( [role-names as String[]] ) as Sequence
Returns a sequence of unique sec:role-id
elements
that corresponds to the sequence of role names
$role-names
.
Duplicate names return a single ID.
If $role-names
is omitted, returns all of the
sec:role-id
elements in the database.
If a role name in $role-names
does not correspond
to an existing role, an error is returned.
Parameters | |
---|---|
role-names | A
sequence of role names. If omitted, returns all of the
sec:role-id elements in the database.
|
http://marklogic.com/xdmp/privileges/get-role-ids
This function must be executed against the security database.
// execute this against the security database // There is no JSON output for this function. const sec = require('/MarkLogic/security.xqy'); sec.getRoleIds(("writer", "editor")) => <sec:role-id xmlns:sec="http://marklogic.com/xdmp/security">6629014463670416824</sec:role-id> <sec:role-id xmlns:sec="http://marklogic.com/xdmp/security">6615337390848046012</sec:role-id>
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.