Loading TOC...

MarkLogic 10 Product Documentation
sec:role-set-name

sec:role-set-name(
   $role-name as xs:string,
   $new-role-name as xs:string
) as empty-sequence()

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 :)
xquery version "1.0-ml";
import module namespace sec="http://marklogic.com/xdmp/security" at 
    "/MarkLogic/security.xqy";
 
sec:role-set-name("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.