mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Merge pull request #21097 from overleaf/ls-scripts-to-esm-1
Migrate scripts folder to esm 1/x GitOrigin-RevId: 4a4bc9a161f144fdb40ce3f2a0a9313b36c6df81
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import SAMLUserIdAttributeBatchHandler from '../modules/saas-authentication/app/src/SAML/SAMLUserIdAttributeBatchHandler.js'
|
||||
|
||||
const startInstitutionId = parseInt(process.argv[2])
|
||||
const endInstitutionId = parseInt(process.argv[3])
|
||||
|
||||
process.env.LOG_LEVEL = 'info'
|
||||
|
||||
process.env.MONGO_CONNECTION_STRING =
|
||||
process.env.READ_ONLY_MONGO_CONNECTION_STRING
|
||||
|
||||
console.log('Checking users at institutions')
|
||||
|
||||
console.log(
|
||||
'Start institution ID:',
|
||||
startInstitutionId ||
|
||||
'none provided, will start at beginning of ordered list.'
|
||||
)
|
||||
console.log(
|
||||
'End institution ID:',
|
||||
endInstitutionId || 'none provided, will go to end of ordered list.'
|
||||
)
|
||||
|
||||
try {
|
||||
const result = await SAMLUserIdAttributeBatchHandler.check(
|
||||
startInstitutionId,
|
||||
endInstitutionId
|
||||
)
|
||||
console.log(result)
|
||||
process.exit(0)
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
process.exit(1)
|
||||
}
|
||||
Reference in New Issue
Block a user