From 59dbf3ca10b80a71df3c28184b46b671912c95d6 Mon Sep 17 00:00:00 2001 From: Eric Mc Sween <5454374+emcsween@users.noreply.github.com> Date: Mon, 21 Aug 2023 09:09:31 -0400 Subject: [PATCH] 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 --- services/web/app/src/infrastructure/Features.js | 2 +- services/web/test/unit/src/infrastructure/FeaturesTests.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/web/app/src/infrastructure/Features.js b/services/web/app/src/infrastructure/Features.js index 254e289986..2300a8ff8f 100644 --- a/services/web/app/src/infrastructure/Features.js +++ b/services/web/app/src/infrastructure/Features.js @@ -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'])) diff --git a/services/web/test/unit/src/infrastructure/FeaturesTests.js b/services/web/test/unit/src/infrastructure/FeaturesTests.js index acfa3cafd1..2dee271997 100644 --- a/services/web/test/unit/src/infrastructure/FeaturesTests.js +++ b/services/web/test/unit/src/infrastructure/FeaturesTests.js @@ -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 () {