MarkLogic 10 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.   
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy