trgr.triggerSetPermissions( trigger-name as String, permissions as Sequence ) as null
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.
// Run in the context of the database containing the trigger. declareUpdate(); const trgr = require('/MarkLogic/triggers'); trgr.triggerSetPermissions( 'myTrigger', Sequence.from(xdmp.defaultPermissions(null, 'elements')) ); // Empty sequence. The trigger 'myTrigger' may be modified // roles which have the default permissions.