Loading TOC...

sec:remove-role

sec:remove-role(
   $role-name as xs:string
) as empty-sequence()

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


xquery version "1.0-ml";
import module namespace sec="http://marklogic.com/xdmp/security" at 
    "/MarkLogic/security.xqy";

sec:remove-role("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.