diff --git a/app/src/app.config.json.tpl b/app/src/app.config.json.tpl index 8a71ec004..c6008bf67 100644 --- a/app/src/app.config.json.tpl +++ b/app/src/app.config.json.tpl @@ -15,7 +15,7 @@ }, "plugins": { "aosPlugin": "${APP_CONFIG_PLUGIN_AOS}", - "contentService": ${APP_CONFIG_PLUGIN_CONTENT_SERVICE}, + "contentService": "${APP_CONFIG_PLUGIN_CONTENT_SERVICE}", "folderRules": ${APP_CONFIG_PLUGIN_FOLDER_RULES} }, "oauth2": { diff --git a/projects/aca-content/src/lib/services/content-service-extension.service.spec.ts b/projects/aca-content/src/lib/services/content-service-extension.service.spec.ts index 9cca1cf49..08eca917a 100644 --- a/projects/aca-content/src/lib/services/content-service-extension.service.spec.ts +++ b/projects/aca-content/src/lib/services/content-service-extension.service.spec.ts @@ -42,7 +42,7 @@ describe('ContentServiceExtensionService', () => { appConfig = TestBed.inject(AppConfigService); appConfig.config = Object.assign(appConfig.config, { plugins: { - contentService: true + contentService: 'true' } }); diff --git a/projects/aca-content/src/lib/services/content-service-extension.service.ts b/projects/aca-content/src/lib/services/content-service-extension.service.ts index b1b2e1e34..4e437f3d9 100644 --- a/projects/aca-content/src/lib/services/content-service-extension.service.ts +++ b/projects/aca-content/src/lib/services/content-service-extension.service.ts @@ -36,10 +36,10 @@ export class ContentServiceExtensionService { updateContentServiceAvailability() { this.appConfigService.onLoad.pipe(take(1)).subscribe((config) => { - if (config.plugins && config.plugins.contentService === false) { - this.disableContentServices(); - } else { + if (config?.plugins?.contentService === 'true') { this.enableContentServices(); + } else { + this.disableContentServices(); } }); } @@ -51,7 +51,7 @@ export class ContentServiceExtensionService { } private enableContentServices() { - if (localStorage && localStorage.getItem('contentService') === 'false') { + if (localStorage) { localStorage.setItem('contentService', 'true'); } }