trgr:trigger-set-permissions( $trigger-name as xs:string, $permissions as item()* ) as empty-sequence()
Sets the permissions that determine which roles are permitted to modify the named trigger.
Any permissions previously associated with the trigger are replaced.
This function must be run in the context of the database containing the trigger to be modified.
If the named trigger does not exist, the exception
TRGR-TRIGGERDNE
is raised.
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-set-permissions( "myTrigger", xdmp:default-permissions() ) => Empty sequence. The trigger "myTrigger" may be modified roles which have the default permissions.
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.