
sec.roleSetName( role-name as String, new-role-name as String ) as null
  Changes the sec:role-name of a role from $role-name to 
  $new-role-name.
  If $new-role-name is not unique, an error is returned.
  
| Parameters | |
|---|---|
| role-name | The name of the role to change. | 
| new-role-name | The new name for the role. | 
http://marklogic.com/xdmp/privileges/role-set-name
  This function must be executed against the security database.
// execute this against the security database
declareUpdate();  
const sec = require('/MarkLogic/security.xqy');
 
sec.roleSetName("Temporary", "Contractor")  
// Changes the name of the "Temporary" role to "Contractor."