Skip to content

Commit b73926c

Browse files
committed
feat: skip onboarding for users with topcoder customer role
Signed-off-by: Rakib Ansary <[email protected]>
1 parent 054d887 commit b73926c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

web-assets/auth0/dev-tenant/rules/onboardingChecklist.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ function (user, context, callback) {
2424
const handle = context.idToken[global.AUTH0_CLAIM_NAMESPACE + 'handle'];
2525
console.log("rule:onboarding-checklist: fetch onboarding_checklist for email/handle: ", user.email, handle);
2626

27+
const roles = context.idToken[global.AUTH0_CLAIM_NAMESPACE + 'roles']
28+
29+
if (roles && roles.includes('Topcoder Customer')) {
30+
console.log("rule:onboarding-checklist:exiting due to user being a customer.");
31+
return callback(null, user, context);
32+
}
33+
2734
if (handle == null) {
2835
console.log("rule:onboarding-checklist: exiting due to handle being null.");
2936
return callback(null, user, context);

0 commit comments

Comments
 (0)