overleaf/services/web/scripts/check_saml_emails.js
Alexandre Bourdin 4997b7f1ee Merge pull request #20062 from overleaf/ab-saas-authentication-module-renaming
[web] Rename overleaf-integration module to saas-authentication

GitOrigin-RevId: 7d69e06a19da9855fa9a0962114ad97b45ad8875
2024-08-23 08:04:43 +00:00

19 lines
616 B
JavaScript

process.env.MONGO_SOCKET_TIMEOUT = '300000'
// Run all the mongo queries on secondaries
process.env.MONGO_CONNECTION_STRING =
process.env.READ_ONLY_MONGO_CONNECTION_STRING
const SAMLEmailBatchCheck = require('../modules/saas-authentication/app/src/SAML/SAMLEmailBatchCheck')
const startInstitutionId = parseInt(process.argv[2])
const emitDetailedData = process.argv.includes('--detailed-data')
SAMLEmailBatchCheck.promises
.checkEmails(startInstitutionId, emitDetailedData)
.then(result => {
console.table(result)
process.exit()
})
.catch(err => {
console.error(err)
process.exit(1)
})