Loading TOC...

MarkLogic Server 11.0 Product Documentation
trgr.triggerGetPermissions

trgr.triggerGetPermissions(
   trigger-name as String
) as Sequence

Summary

Returns the permissions for the named trigger.

Parameters
trigger-name The trigger name.

Usage Notes

The permissions on a trigger determine which roles may modify the trigger. 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.

Example

// Run in the context of the database containing the trigger.

const trgr = require('/MarkLogic/triggers');

trgr.triggerGetPermissions('myTrigger');

/*
<sec:permission xmlns:sec="http://marklogic.com/xdmp/security">
       <sec:capability>update</sec:capability>
       <sec:role-id>6991745490888355329</sec:role-id>
     </sec:permission>
     <sec:permission xmlns:sec="http://marklogic.com/xdmp/security">
       <sec:capability>read</sec:capability>
       <sec:role-id>6991745490888355329</sec:role-id>
     </sec:permission>
*/
   

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.