trgr.triggerAddPermissions( trigger-name as String, permissions as Sequence ) as null
Adds permissions to the set of permissions on the named trigger.
Any permissions previously associated with the trigger remain intact. This function must be run in the context of the database containing the trigger to be examined.
If the named trigger does not exist, the exception
TRGR-TRIGGERDNE
is raised.
// Run in the context of the database containing the trigger. const trgr = require('/MarkLogic/triggers'); trgr.triggerAddPermissions( 'myTrigger', (xdmp.permission('some-role', 'read'), xdmp.permission('some-role', 'modify')) );
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.