mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2025-08-05 17:00:06 +02:00

Remove ScriptRunner usage in institution user checks and SSO ID migration scripts GitOrigin-RevId: 69bf575f879516e8daeb068f6911856c9d6f226c
20 lines
646 B
JavaScript
20 lines
646 B
JavaScript
import SAMLEmailBatchCheck from '../modules/saas-authentication/app/src/SAML/SAMLEmailBatchCheck.mjs'
|
|
import { ensureRunningOnMongoSecondaryWithTimeout } from './helpers/env_variable_helper.mjs'
|
|
|
|
// ScriptRunner can not be used when using this assertion
|
|
ensureRunningOnMongoSecondaryWithTimeout(300000)
|
|
|
|
const startInstitutionId = parseInt(process.argv[2])
|
|
const emitDetailedData = process.argv.includes('--detailed-data')
|
|
|
|
try {
|
|
const result = await SAMLEmailBatchCheck.promises.checkEmails(
|
|
startInstitutionId,
|
|
emitDetailedData
|
|
)
|
|
console.table(result)
|
|
process.exit()
|
|
} catch (error) {
|
|
console.error(error)
|
|
process.exit(1)
|
|
}
|