diff --git a/src/services/ResourceService.js b/src/services/ResourceService.js index d32e84d..6132977 100644 --- a/src/services/ResourceService.js +++ b/src/services/ResourceService.js @@ -273,6 +273,10 @@ async function init (currentUser, challengeId, resource, isCreated) { if (_.get(challenge, 'task.isTask', false)) { return { resources, memberId, handle } } + // bypass phase dependency checks if the caller is an m2m/admin + if (currentUser.isMachine || helper.hasAdminRole(currentUser)) { + return { resources, memberId, handle } + } // check phases dependencies const dependencies = await ResourceRolePhaseDependencyService.getDependencies({ resourceRoleId: resource.roleId }) _.forEach(dependencies, (dependency) => {