sec:role-set-default-permissions( $role-name as xs:string, $permissions as element(sec:permission)* ) as empty-sequence()
Sets the default permissions for a role with name $role-name.
Parameters | |
---|---|
role-name | The name of the role to which the default permissions are set. |
permissions | New permissions. If the empty sequence is provided, deletes the existing permissions. |
http://marklogic.com/xdmp/privileges/role-set-default-permissions
If a role with name $role-name is not found, an error is raised.
This function must be executed against the security database.
(: execute this against the security database :) xquery version "1.0-ml"; import module namespace sec="http://marklogic.com/xdmp/security" at "/MarkLogic/security.xqy"; sec:role-set-default-permissions( "Developer", (xdmp:permission("security", "read"), xdmp:permission("security", "update"))) (: Sets the default permissions for the "Developer" role to security(read) and security(update). :)