MarkLogic 9 Product Documentation
trgr:trigger-remove-permissions

trgr:trigger-remove-permissions(
   $trigger-name as xs:string,
   $permissions as item()*
) as empty-sequence()

Summary

Removes a set of permissions from the set of permissions on the named trigger.

Parameters
trigger-name The trigger name.
permissions A sequence of permissions. When run in an XQuery context, the permissions are a sequence of XML elements (sec:permission). When importing this module into a Server-Side JavaScript context, the permissions are an array of Objects.

Usage Notes

This function must be run in the context of the database containing the trigger to be modified.

Any permissions on $trigger-name not listed in $permissions are unchanged.

Any permissions in $permissions not associated with $trigger-name are ignored.

If the named trigger does not exist, the exception TRGR-TRIGGERDNE is raised.

Example

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

(: Run in the context of the database containing the trigger :)
trgr:trigger-remove-permissions(
    "myTrigger",
    (xdmp:permission("some-role", "modify"))
)
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy