Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
James Cori committed Dec 3, 2020
2 parents b5e01b1 + bbcc913 commit 75e0d76
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/services/ResourceService.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 75e0d76

Please sign in to comment.