Loading TOC...

MarkLogic 10 Product Documentation
sec.roleSetName

sec.roleSetName(
   role-name as String,
   new-role-name as String
) as null

Summary

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.

Required Privileges

http://marklogic.com/xdmp/privileges/role-set-name

Usage Notes

This function must be executed against the security database.

Example


// 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."  
  

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.