Steps to reproduce :
1) Before you start OpenIDM add the line below to the following file after 'var _ = require('lib/lodash');' openidm/bin/defaults/script/roles/onSync-roles.js to log that this "onSync" script was executed.
2) Start OpenIDM.
3) Navigate to the 'Managed Objects' page via the UI.
4) Select the 'User' managed object.
5) In the Managed Object > user view click on the scripts tab. We are going to create an "onSync" hook script to log that onSync was triggered for a managed/user.
6) Create a new Script inline with something like, console.log("Managed/User onSync script triggered");
7) Create a new managed/user
8) Look at OSGI console and see that the onSync script from the Managed/User object has logged 'Managed/User onSync script triggered'
9) Create a new managed/role
10) Look at OSGI console and see that the onSync script from the Managed/User object has logged 'Calling onSync-Roles.js'
11) Now create a new edge between Managed/User/phill and Managed/Role/SuperStarRole
12) Notice that now the only thing that shows up in the console is 'Managed/User onSync script triggered' which is the onSync for the managed/user object and the one for managed/role never got triggered.