Skip to content

Commit ad017be

Browse files
authored
Merge pull request #62 from topcoder-platform/develop
1.8.3
2 parents de67306 + 5bcb111 commit ad017be

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/constants.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ module.exports = {
6060
}
6161
},
6262
VANILLA: {
63+
DEFAULT_MEMBER_ROLES: ['Vanilla Member'],
6364
CHALLENGES_FORUM: 'Challenges Forums',
6465
CATEGORY_DISPLAY_STYLE: {
6566
CATEGORIES: 'categories',

src/services/vanilla.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ async function manageVanillaUser (data) {
5959
if (!vanillaUser) {
6060
logger.info(`The '${username}' user wasn't found in Vanilla`)
6161

62-
const defaultVanillaRoles = _.filter(allNewVanillaRoles, { type: 'member' })
62+
const defaultVanillaRoles = _.filter(allNewVanillaRoles, function (role) {
63+
return role.type === 'member' && constants.VANILLA.DEFAULT_MEMBER_ROLES.includes(role.name)
64+
})
65+
6366
const defaultVanillaRoleIDs = _.map(defaultVanillaRoles, 'roleID')
6467

6568
const userData = {

0 commit comments

Comments
 (0)