Loading TOC...

MarkLogic Server 11.0 Product Documentation
sec.removeRole

sec.removeRole(
   role-name as String
) as null

Summary

Removes the role ($role-name).

If a role with name equal to $role-name is not found, an error is returned.

This function also removes all references to the role (privileges, amps, permissions and users).

Parameters
role-name The name of a role.

Required Privileges

http://marklogic.com/xdmp/privileges/remove-role

Usage Notes

This function must be executed against the security database.

Example



declareUpdate();  
const sec = require('/MarkLogic/security.xqy');

sec.removeRole("Temporary")
 
// Removes the role, named Temporary.   
  

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