mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-09-17 14:21:14 +00:00
migrate contentService
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
},
|
},
|
||||||
"plugins": {
|
"plugins": {
|
||||||
"aosPlugin": "${APP_CONFIG_PLUGIN_AOS}",
|
"aosPlugin": "${APP_CONFIG_PLUGIN_AOS}",
|
||||||
"contentService": ${APP_CONFIG_PLUGIN_CONTENT_SERVICE},
|
"contentService": "${APP_CONFIG_PLUGIN_CONTENT_SERVICE}",
|
||||||
"folderRules": ${APP_CONFIG_PLUGIN_FOLDER_RULES}
|
"folderRules": ${APP_CONFIG_PLUGIN_FOLDER_RULES}
|
||||||
},
|
},
|
||||||
"oauth2": {
|
"oauth2": {
|
||||||
|
@@ -42,7 +42,7 @@ describe('ContentServiceExtensionService', () => {
|
|||||||
appConfig = TestBed.inject(AppConfigService);
|
appConfig = TestBed.inject(AppConfigService);
|
||||||
appConfig.config = Object.assign(appConfig.config, {
|
appConfig.config = Object.assign(appConfig.config, {
|
||||||
plugins: {
|
plugins: {
|
||||||
contentService: true
|
contentService: 'true'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -36,10 +36,10 @@ export class ContentServiceExtensionService {
|
|||||||
|
|
||||||
updateContentServiceAvailability() {
|
updateContentServiceAvailability() {
|
||||||
this.appConfigService.onLoad.pipe(take(1)).subscribe((config) => {
|
this.appConfigService.onLoad.pipe(take(1)).subscribe((config) => {
|
||||||
if (config.plugins && config.plugins.contentService === false) {
|
if (config?.plugins?.contentService === 'true') {
|
||||||
this.disableContentServices();
|
|
||||||
} else {
|
|
||||||
this.enableContentServices();
|
this.enableContentServices();
|
||||||
|
} else {
|
||||||
|
this.disableContentServices();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -51,7 +51,7 @@ export class ContentServiceExtensionService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private enableContentServices() {
|
private enableContentServices() {
|
||||||
if (localStorage && localStorage.getItem('contentService') === 'false') {
|
if (localStorage) {
|
||||||
localStorage.setItem('contentService', 'true');
|
localStorage.setItem('contentService', 'true');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user