Skip to content

Commit 7d0f8df

Browse files
authored
Merge pull request #47 from topcoder-platform/issues-229_1
Issues-229: added Submitter role
2 parents 9481b5c + fbd2126 commit 7d0f8df

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/constants.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ module.exports = {
4747
},
4848
CHALLENGE_ROLES: {
4949
COPILOT: 'Copilot',
50-
MANAGER: 'Manager'
50+
MANAGER: 'Manager',
51+
SUBMITTER: 'Submitter'
5152
}
5253
},
5354
VANILLA: {

src/services/vanilla.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -335,9 +335,10 @@ function shouldWatchCategories (projectRole, challengeRoles) {
335335
return true
336336
}
337337

338-
// Project Copilots / Challenge Copilots
338+
// Project Copilots / Challenge Copilots and Submitters
339339
return (projectRole === constants.TOPCODER.PROJECT_ROLES.COPILOT ||
340-
(_.isArray(challengeRoles) && _.includes(challengeRoles, constants.TOPCODER.CHALLENGE_ROLES.COPILOT))
340+
(_.isArray(challengeRoles) && (_.includes(challengeRoles, constants.TOPCODER.CHALLENGE_ROLES.COPILOT) ||
341+
_.includes(challengeRoles, constants.TOPCODER.CHALLENGE_ROLES.SUBMITTER)))
341342
)
342343
}
343344

@@ -353,11 +354,12 @@ function shouldFollowCategories (projectRole, challengeRoles) {
353354
return true
354355
}
355356

356-
// Project Copilots or Managers / Challenge Copilots and Managers
357+
// Project Copilots or Managers / Challenge Copilots, Managers and Submitters
357358
return projectRole === constants.TOPCODER.PROJECT_ROLES.COPILOT ||
358359
projectRole === constants.TOPCODER.PROJECT_ROLES.MANAGER ||
359360
(_.isArray(challengeRoles) && (_.includes(challengeRoles, constants.TOPCODER.CHALLENGE_ROLES.COPILOT) ||
360-
_.includes(challengeRoles, constants.TOPCODER.CHALLENGE_ROLES.MANAGER))
361+
_.includes(challengeRoles, constants.TOPCODER.CHALLENGE_ROLES.MANAGER) ||
362+
_.includes(challengeRoles, constants.TOPCODER.CHALLENGE_ROLES.SUBMITTER))
361363
)
362364
}
363365

0 commit comments

Comments
 (0)