From dc50e9bbb8ae02872f315d705625bdc44d05d8d6 Mon Sep 17 00:00:00 2001 From: Bogdanova Olga Date: Tue, 15 Dec 2020 14:29:54 +0300 Subject: [PATCH 1/2] Issues-229: added Submitter role --- src/constants.js | 3 ++- src/services/vanilla.js | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/constants.js b/src/constants.js index 140a1b4..fb316fd 100644 --- a/src/constants.js +++ b/src/constants.js @@ -47,7 +47,8 @@ module.exports = { }, CHALLENGE_ROLES: { COPILOT: 'Copilot', - MANAGER: 'Manager' + MANAGER: 'Manager', + SUBMITTER: 'Submitter' } }, VANILLA: { diff --git a/src/services/vanilla.js b/src/services/vanilla.js index c4f8d2f..84655a4 100644 --- a/src/services/vanilla.js +++ b/src/services/vanilla.js @@ -337,7 +337,8 @@ function shouldWatchCategories (projectRole, challengeRoles) { // Project Copilots / Challenge Copilots return (projectRole === constants.TOPCODER.PROJECT_ROLES.COPILOT || - (_.isArray(challengeRoles) && _.includes(challengeRoles, constants.TOPCODER.CHALLENGE_ROLES.COPILOT)) + (_.isArray(challengeRoles) && (_.includes(challengeRoles, constants.TOPCODER.CHALLENGE_ROLES.COPILOT) || + _.includes(challengeRoles, constants.TOPCODER.CHALLENGE_ROLES.SUBMITTER))) ) } @@ -357,7 +358,8 @@ function shouldFollowCategories (projectRole, challengeRoles) { return projectRole === constants.TOPCODER.PROJECT_ROLES.COPILOT || projectRole === constants.TOPCODER.PROJECT_ROLES.MANAGER || (_.isArray(challengeRoles) && (_.includes(challengeRoles, constants.TOPCODER.CHALLENGE_ROLES.COPILOT) || - _.includes(challengeRoles, constants.TOPCODER.CHALLENGE_ROLES.MANAGER)) + _.includes(challengeRoles, constants.TOPCODER.CHALLENGE_ROLES.MANAGER) || + _.includes(challengeRoles, constants.TOPCODER.CHALLENGE_ROLES.SUBMITTER)) ) } From fbd2126848746c6538b8d4926fb9d24408e16105 Mon Sep 17 00:00:00 2001 From: Bogdanova Olga Date: Tue, 15 Dec 2020 14:32:16 +0300 Subject: [PATCH 2/2] Issues-229: added Submitter role --- src/services/vanilla.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/vanilla.js b/src/services/vanilla.js index 84655a4..7212846 100644 --- a/src/services/vanilla.js +++ b/src/services/vanilla.js @@ -335,7 +335,7 @@ function shouldWatchCategories (projectRole, challengeRoles) { return true } - // Project Copilots / Challenge Copilots + // Project Copilots / Challenge Copilots and Submitters return (projectRole === constants.TOPCODER.PROJECT_ROLES.COPILOT || (_.isArray(challengeRoles) && (_.includes(challengeRoles, constants.TOPCODER.CHALLENGE_ROLES.COPILOT) || _.includes(challengeRoles, constants.TOPCODER.CHALLENGE_ROLES.SUBMITTER))) @@ -354,7 +354,7 @@ function shouldFollowCategories (projectRole, challengeRoles) { return true } - // Project Copilots or Managers / Challenge Copilots and Managers + // Project Copilots or Managers / Challenge Copilots, Managers and Submitters return projectRole === constants.TOPCODER.PROJECT_ROLES.COPILOT || projectRole === constants.TOPCODER.PROJECT_ROLES.MANAGER || (_.isArray(challengeRoles) && (_.includes(challengeRoles, constants.TOPCODER.CHALLENGE_ROLES.COPILOT) ||