Merge pull request #20062 from overleaf/ab-saas-authentication-module-renaming

[web] Rename overleaf-integration module to saas-authentication

GitOrigin-RevId: 7d69e06a19da9855fa9a0962114ad97b45ad8875
This commit is contained in:
Alexandre Bourdin 2024-08-22 16:25:00 +02:00 committed by Copybot
parent 0e71084600
commit 4997b7f1ee
11 changed files with 16 additions and 19 deletions

View file

@ -28,7 +28,7 @@ make test
To run both unit and acceptance tests for a module run: To run both unit and acceptance tests for a module run:
``` ```
make test_module MODULE=overleaf-integration make test_module MODULE=saas-authentication
``` ```
### Unit Tests ### Unit Tests
@ -51,12 +51,12 @@ make test_unit MOCHA_GREP='AuthorizationManager'
To run only the unit tests for a single module do: To run only the unit tests for a single module do:
``` ```
make test_unit_module MODULE=overleaf-integration make test_unit_module MODULE=saas-authentication
``` ```
Module tests can also use a MOCHA_GREP argument: Module tests can also use a MOCHA_GREP argument:
``` ```
make test_unit_module MODULE=overleaf-integration MOCHA_GREP=SSO make test_unit_module MODULE=saas-authentication MOCHA_GREP=SSO
``` ```
### Acceptance Tests ### Acceptance Tests
@ -87,12 +87,12 @@ make test_acceptance_run MOCHA_GREP='AuthorizationManager'
To run only the acceptance tests for a single module do: To run only the acceptance tests for a single module do:
``` ```
make test_acceptance_module MODULE=overleaf-integration make test_acceptance_module MODULE=saas-authentication
``` ```
Module tests can also use a MOCHA_GREP argument: Module tests can also use a MOCHA_GREP argument:
``` ```
make test_acceptance_module MODULE=overleaf-integration MOCHA_GREP=SSO make test_acceptance_module MODULE=saas-authentication MOCHA_GREP=SSO
``` ```
Routes Routes

View file

@ -68,7 +68,7 @@ const TokenGenerator = {
function (cb) { function (cb) {
const token = TokenGenerator.readOnlyToken() const token = TokenGenerator.readOnlyToken()
if (!Features.hasFeature('overleaf-integration')) { if (!Features.hasFeature('saas')) {
return cb(null, token) return cb(null, token)
} }

View file

@ -69,8 +69,6 @@ const Features = {
case 'affiliations': case 'affiliations':
case 'analytics': case 'analytics':
return Boolean(_.get(Settings, ['apis', 'v1', 'url'])) return Boolean(_.get(Settings, ['apis', 'v1', 'url']))
case 'overleaf-integration':
return Boolean(Settings.overleaf)
case 'references': case 'references':
return Boolean(_.get(Settings, ['apis', 'references', 'url'])) return Boolean(_.get(Settings, ['apis', 'references', 'url']))
case 'saml': case 'saml':

View file

@ -156,7 +156,7 @@
@import 'modules/admin-panel.less'; @import 'modules/admin-panel.less';
@import 'modules/git-bridge-modal.less'; @import 'modules/git-bridge-modal.less';
@import 'modules/group-settings.less'; @import 'modules/group-settings.less';
@import 'modules/overleaf-integration.less'; @import 'modules/onboarding.less';
@import 'modules/writefull.less'; @import 'modules/writefull.less';
@import 'modules/third-party-references.less'; @import 'modules/third-party-references.less';
@import 'modules/labs.less'; @import 'modules/labs.less';

View file

@ -1,4 +1,4 @@
const SAMLUserIdAttributeBatchHandler = require('../modules/overleaf-integration/app/src/SAML/SAMLUserIdAttributeBatchHandler') const SAMLUserIdAttributeBatchHandler = require('../modules/saas-authentication/app/src/SAML/SAMLUserIdAttributeBatchHandler')
const startInstitutionId = parseInt(process.argv[2]) const startInstitutionId = parseInt(process.argv[2])
const endInstitutionId = parseInt(process.argv[3]) const endInstitutionId = parseInt(process.argv[3])

View file

@ -2,7 +2,7 @@ process.env.MONGO_SOCKET_TIMEOUT = '300000'
// Run all the mongo queries on secondaries // Run all the mongo queries on secondaries
process.env.MONGO_CONNECTION_STRING = process.env.MONGO_CONNECTION_STRING =
process.env.READ_ONLY_MONGO_CONNECTION_STRING process.env.READ_ONLY_MONGO_CONNECTION_STRING
const SAMLEmailBatchCheck = require('../modules/overleaf-integration/app/src/SAML/SAMLEmailBatchCheck') const SAMLEmailBatchCheck = require('../modules/saas-authentication/app/src/SAML/SAMLEmailBatchCheck')
const startInstitutionId = parseInt(process.argv[2]) const startInstitutionId = parseInt(process.argv[2])
const emitDetailedData = process.argv.includes('--detailed-data') const emitDetailedData = process.argv.includes('--detailed-data')

View file

@ -3,7 +3,7 @@ process.env.MONGO_CONNECTION_STRING =
process.env.READ_ONLY_MONGO_CONNECTION_STRING process.env.READ_ONLY_MONGO_CONNECTION_STRING
const { waitForDb } = require('../app/src/infrastructure/mongodb') const { waitForDb } = require('../app/src/infrastructure/mongodb')
const SAMLUserIdMigrationHandler = require('../modules/overleaf-integration/app/src/SAML/SAMLUserIdMigrationHandler') const SAMLUserIdMigrationHandler = require('../modules/saas-authentication/app/src/SAML/SAMLUserIdMigrationHandler')
const institutionId = parseInt(process.argv[2]) const institutionId = parseInt(process.argv[2])
if (isNaN(institutionId)) throw new Error('No institution id') if (isNaN(institutionId)) throw new Error('No institution id')

View file

@ -1,6 +1,6 @@
process.env.MONGO_SOCKET_TIMEOUT = '300000' process.env.MONGO_SOCKET_TIMEOUT = '300000'
const { waitForDb } = require('../app/src/infrastructure/mongodb') const { waitForDb } = require('../app/src/infrastructure/mongodb')
const SAMLUserIdMigrationHandler = require('../modules/overleaf-integration/app/src/SAML/SAMLUserIdMigrationHandler') const SAMLUserIdMigrationHandler = require('../modules/saas-authentication/app/src/SAML/SAMLUserIdMigrationHandler')
const institutionId = parseInt(process.argv[2]) const institutionId = parseInt(process.argv[2])
if (isNaN(institutionId)) throw new Error('No institution id') if (isNaN(institutionId)) throw new Error('No institution id')

View file

@ -362,7 +362,7 @@ describe('ProjectListController', function () {
this.institutionName = 'Overleaf' this.institutionName = 'Overleaf'
this.Features.hasFeature.withArgs('saml').returns(true) this.Features.hasFeature.withArgs('saml').returns(true)
this.Features.hasFeature.withArgs('affiliations').returns(true) this.Features.hasFeature.withArgs('affiliations').returns(true)
this.Features.hasFeature.withArgs('overleaf-integration').returns(true) this.Features.hasFeature.withArgs('saas').returns(true)
done() done()
}) })
it('should show institution SSO available notification for confirmed domains', function () { it('should show institution SSO available notification for confirmed domains', function () {

View file

@ -59,7 +59,7 @@ describe('Features', function () {
expect(this.Features.hasFeature('homepage')).to.be.false expect(this.Features.hasFeature('homepage')).to.be.false
expect(this.Features.hasFeature('link-url')).to.be.false expect(this.Features.hasFeature('link-url')).to.be.false
expect(this.Features.hasFeature('oauth')).to.be.false expect(this.Features.hasFeature('oauth')).to.be.false
expect(this.Features.hasFeature('overleaf-integration')).to.be.false expect(this.Features.hasFeature('saas')).to.be.false
expect(this.Features.hasFeature('references')).to.be.false expect(this.Features.hasFeature('references')).to.be.false
expect(this.Features.hasFeature('saml')).to.be.false expect(this.Features.hasFeature('saml')).to.be.false
expect(this.Features.hasFeature('templates-server-pro')).to.be.false expect(this.Features.hasFeature('templates-server-pro')).to.be.false
@ -72,7 +72,7 @@ describe('Features', function () {
this.settings.apis = {} this.settings.apis = {}
}) })
it('should return true', function () { it('should return true', function () {
expect(this.Features.hasFeature('overleaf-integration')).to.be.true expect(this.Features.hasFeature('saas')).to.be.true
expect(this.Features.hasFeature('registration')).to.be.true expect(this.Features.hasFeature('registration')).to.be.true
}) })
it('should return false', function () { it('should return false', function () {
@ -104,7 +104,7 @@ describe('Features', function () {
it('should return true', function () { it('should return true', function () {
expect(this.Features.hasFeature('affiliations')).to.be.true expect(this.Features.hasFeature('affiliations')).to.be.true
expect(this.Features.hasFeature('analytics')).to.be.true expect(this.Features.hasFeature('analytics')).to.be.true
expect(this.Features.hasFeature('overleaf-integration')).to.be.true expect(this.Features.hasFeature('saas')).to.be.true
expect(this.Features.hasFeature('references')).to.be.true expect(this.Features.hasFeature('references')).to.be.true
expect(this.Features.hasFeature('registration')).to.be.true expect(this.Features.hasFeature('registration')).to.be.true
}) })
@ -135,8 +135,7 @@ describe('Features', function () {
expect(this.Features.hasFeature('homepage')).to.be.true expect(this.Features.hasFeature('homepage')).to.be.true
expect(this.Features.hasFeature('link-url')).to.be.true expect(this.Features.hasFeature('link-url')).to.be.true
expect(this.Features.hasFeature('oauth')).to.be.true expect(this.Features.hasFeature('oauth')).to.be.true
expect(this.Features.hasFeature('overleaf-integration')).to.be expect(this.Features.hasFeature('saas')).to.be.true
.true
expect(this.Features.hasFeature('references')).to.be.true expect(this.Features.hasFeature('references')).to.be.true
expect(this.Features.hasFeature('registration')).to.be.true expect(this.Features.hasFeature('registration')).to.be.true
expect(this.Features.hasFeature('saml')).to.be.true expect(this.Features.hasFeature('saml')).to.be.true