Skip to content

Commit

Permalink
Update GHE mapping to match current rule in production
Browse files Browse the repository at this point in the history
  • Loading branch information
dividehex committed May 22, 2024
1 parent 51c16e5 commit 44a11bd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions rules/GHE-Groups.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ function GHEGroups(user, context, callback) {
'RLPUxhCQsmmRHyOmDOGkLpu1mArNH3xn': 'mozilliansorg_ghe_firefoxux_users',
'KMcYzqySOFXHteY1zliDlq577ARCb6gi': 'mozilliansorg_ghe_mozillasocial_users',
'IEc83wZvZzcQXMkpUmrnb9P8wztUiokl': 'mozilliansorg_ghe_mozscout_users',
'vkoDkHlCEUhlHNhVDtewJqRLVLGVsPrZ': 'mozilliansorg_ghe_mozilla-fakespot_users'
'vkoDkHlCEUhlHNhVDtewJqRLVLGVsPrZ': 'mozilliansorg_ghe_mozilla-fakespot_users',
'T6mjvGguOB5hkq9Aviaa58tOlwpJG5o6': 'mozilliansorg_ghe_mozilla-necko_users',
'ZemrAl9S2q9GKJNQUdjZCNsLiVmSEg1P': 'mozilliansorg_ghe_mozilla-privacy_users'
};

const fetch = require('[email protected]');
Expand Down Expand Up @@ -124,7 +126,7 @@ const getPersonProfile = async () => {
return await response.json();
};


// We only care about SSO applications that exist in the applicationGroupMapping
// If the SSO ID is undefined in applicationGroupMapping, skip processing and return callback()

Expand Down Expand Up @@ -153,7 +155,7 @@ const getPersonProfile = async () => {
}
// If somehow dinopark allows a user to store an empty value
// Let's set to null to be redirected later
if(githubUsername.length === 0) {
if(githubUsername.length === 0) {
console.log("empty HACK#GITHUB");
errorCode = "ghnd";
githubUsername = null;
Expand All @@ -163,7 +165,7 @@ const getPersonProfile = async () => {
console.log("Unable to do the githubUsername lookup: " + e.message);
errorCode = "ghul";
}

// confirm the user has a githubUsername stored in mozillians, otherwise redirect
if(githubUsername === null) {
context.redirect = {
Expand Down

0 comments on commit 44a11bd

Please sign in to comment.