Skip to content

Commit 870b7fa

Browse files
author
Sachin Maheshwari
committed
Plat-960
1 parent 61e0a0b commit 870b7fa

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

web-assets/auth0/prod-tenant/rules/custom.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ function (user, context, callback) {
4242
// TEMP
4343
let tcsso = res.result.content.regSource || '';
4444

45+
// block wipro/topgear contractor user
46+
const topgearBlockMessage = 'Topgear can be accessed only by Wipro Employees. If you are a Wipro employee and not able to access, drop an email to <a href="mailto:[email protected]"> [email protected] </a> with the error message.Back to application ';
47+
if (roles.indexOf(configuration.TOPGEAR_CONTRACTOR_ROLE) > -1) {
48+
return callback(topgearBlockMessage, user, context);
49+
}
50+
4551
context.idToken[global.AUTH0_CLAIM_NAMESPACE + 'roles'] = roles;
4652
context.idToken[global.AUTH0_CLAIM_NAMESPACE + 'userId'] = userId;
4753
context.idToken[global.AUTH0_CLAIM_NAMESPACE + 'handle'] = handle;

0 commit comments

Comments
 (0)