File tree 2 files changed +5
-1
lines changed
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ module.exports = {
60
60
}
61
61
} ,
62
62
VANILLA : {
63
+ DEFAULT_MEMBER_ROLES : [ 'Vanilla Member' ] ,
63
64
CHALLENGES_FORUM : 'Challenges Forums' ,
64
65
CATEGORY_DISPLAY_STYLE : {
65
66
CATEGORIES : 'categories' ,
Original file line number Diff line number Diff line change @@ -59,7 +59,10 @@ async function manageVanillaUser (data) {
59
59
if ( ! vanillaUser ) {
60
60
logger . info ( `The '${ username } ' user wasn't found in Vanilla` )
61
61
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
+
63
66
const defaultVanillaRoleIDs = _ . map ( defaultVanillaRoles , 'roleID' )
64
67
65
68
const userData = {
You can’t perform that action at this time.
0 commit comments