From 72386fcceda32784a7099c440a1096291e773b05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Alby?= Date: Tue, 14 Jun 2022 10:14:03 +0200 Subject: [PATCH] Merge pull request #8360 from overleaf/jel-remove-not-needed-script [web] Remove SAML backfill update script GitOrigin-RevId: 5166ced7657ddc24c99bbd0873874e5c01bbab0f --- .../web/scripts/backfill_users_sso_attribute.js | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/services/web/scripts/backfill_users_sso_attribute.js b/services/web/scripts/backfill_users_sso_attribute.js index 365009da06..791979b14e 100644 --- a/services/web/scripts/backfill_users_sso_attribute.js +++ b/services/web/scripts/backfill_users_sso_attribute.js @@ -1,21 +1,14 @@ const SAMLUserIdAttributeBatchHandler = require('../modules/overleaf-integration/app/src/SAML/SAMLUserIdAttributeBatchHandler') -const COMMIT = process.argv.includes('--commit') const startInstitutionId = parseInt(process.argv[2]) const endInstitutionId = parseInt(process.argv[3]) process.env.LOG_LEVEL = 'info' -let method = 'check' -if (COMMIT) { - method = 'run' - console.log('Setting attribute for linked users') -} else { - process.env.MONGO_CONNECTION_STRING = - process.env.READ_ONLY_MONGO_CONNECTION_STRING - console.log('Doing a dry run without --commit') - console.log('Checking users at institutions') -} +process.env.MONGO_CONNECTION_STRING = + process.env.READ_ONLY_MONGO_CONNECTION_STRING + +console.log('Checking users at institutions') console.log( 'Start institution ID:', @@ -27,7 +20,7 @@ console.log( endInstitutionId || 'none provided, will go to end of ordered list.' ) -SAMLUserIdAttributeBatchHandler[method](startInstitutionId, endInstitutionId) +SAMLUserIdAttributeBatchHandler.check(startInstitutionId, endInstitutionId) .then(result => { console.log(result) process.exit(0)