sec:credential-set-permissions( $credential-name as xs:string, $permissions as element(sec:permission)* ) as empty-sequence()
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.
xquery version "1.0-ml"; import module namespace sec = "http://marklogic.com/xdmp/security" at "/MarkLogic/security.xqy"; sec:credential-set-permissions("my-secure-credential", (xdmp:permission("development", "read"), xdmp:permission("administrators", "update")))