sec.credentialSetPermissions( credential-name as String, permissions as element(sec.permission)[] ) as null
This function updates the permission for the specified credential.
Parameters | |
---|---|
credential-name | The name of the credential. |
permissions | The set of permissions to assign to the credential. |
http://marklogic.com/xdmp/privileges/credential-set-permissions
This function must be executed against the security database.
declareUpdate(); const sec = require('/MarkLogic/security.xqy'); sec.credentialSetPermissions("my-secure-credential", (xdmp.permission("develoment", "read","element"), xdmp.permission("administrators", "update","element")));