mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #8360 from overleaf/jel-remove-not-needed-script
[web] Remove SAML backfill update script GitOrigin-RevId: 5166ced7657ddc24c99bbd0873874e5c01bbab0f
This commit is contained in:
parent
914eb2fbe3
commit
343cfe4f06
1 changed files with 5 additions and 12 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue