mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 05:37:34 +03:00
Allowed optionally enabling collections through a flag
refs https://github.com/TryGhost/Ghost/pull/18028 - The previous conditional meant that if the "host settings" collections enabled flag was set, we couldn't disable collections. The referenced pull request would also disable the collections across all of the hosted environment instances. The updated logic optionally takes into account the "labs" flag, as it should have from the very beginning.
This commit is contained in:
parent
bbb5b64ec5
commit
ce10d34e5e
@ -33,16 +33,16 @@ class CollectionsServiceWrapper {
|
||||
async init() {
|
||||
const config = require('../../../shared/config');
|
||||
const labs = require('../../../shared/labs');
|
||||
// host setting OR labs "collections" flag has to be enabled to run collections service
|
||||
if (!config.get('hostSettings:collections:enabled') && !(labs.isSet('collections'))) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (inited) {
|
||||
return;
|
||||
// host setting OR labs "collections" flag has to be enabled to run collections service
|
||||
if (config.get('hostSettings:collections:enabled') || labs.isSet('collections')) {
|
||||
if (inited) {
|
||||
return;
|
||||
}
|
||||
|
||||
inited = true;
|
||||
this.api.subscribeToEvents();
|
||||
}
|
||||
inited = true;
|
||||
this.api.subscribeToEvents();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user