Merge pull request #14424 from overleaf/em-test-server-pro-templates

Add a switch to enable ServerPro templates in the dev environment

GitOrigin-RevId: 27bd9921ae43a4c29f66f78c34ca8c10f14d930c
This commit is contained in:
Eric Mc Sween 2023-08-21 09:09:31 -04:00 committed by Copybot
parent 35c8bf3b30
commit 59dbf3ca10
2 changed files with 2 additions and 2 deletions

View file

@ -70,7 +70,7 @@ const Features = {
case 'oauth':
return Boolean(Settings.oauth)
case 'templates-server-pro':
return !Settings.overleaf
return Boolean(Settings.templates)
case 'affiliations':
case 'analytics':
return Boolean(_.get(Settings, ['apis', 'v1', 'url']))

View file

@ -49,7 +49,6 @@ describe('Features', function () {
describe('without any settings', function () {
it('should return true', function () {
expect(this.Features.hasFeature('registration-page')).to.be.true
expect(this.Features.hasFeature('templates-server-pro')).to.be.true
})
it('should return false', function () {
expect(this.Features.hasFeature('registration')).to.be.false
@ -64,6 +63,7 @@ describe('Features', function () {
expect(this.Features.hasFeature('overleaf-integration')).to.be.false
expect(this.Features.hasFeature('references')).to.be.false
expect(this.Features.hasFeature('saml')).to.be.false
expect(this.Features.hasFeature('templates-server-pro')).to.be.false
})
})
describe('with settings', function () {