
sec:remove-role( $role-name as xs:string ) as empty-sequence()
  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. | 
http://marklogic.com/xdmp/privileges/remove-role
  This function must be executed against the security database.
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: Get the most useful answers to questions from the MarkLogic community, or ask your own question.