Feature flags feature (#2803)

This commit is contained in:
MeiMei 2018-10-03 12:39:03 +09:00 committed by syuilo
parent e813880392
commit ed6450244d

View file

@ -39,6 +39,15 @@ export default (params: any, me: ILocalUser) => new Promise(async (res, rej) =>
recaptchaSitekey: config.recaptcha ? config.recaptcha.site_key : null,
swPublickey: config.sw ? config.sw.public_key : null,
hidedTags: (me && me.isAdmin) ? meta.hidedTags : undefined,
bannerUrl: meta.bannerUrl
bannerUrl: meta.bannerUrl,
features: {
registration: !meta.disableRegistration,
localTimeLine: !meta.disableLocalTimeline,
elasticsearch: config.elasticsearch ? true : false,
recaptcha: config.recaptcha ? true : false,
objectStorage: config.drive && config.drive.storage === 'minio',
twitter: config.twitter ? true : false,
serviceWorker: config.sw ? true : false
}
});
});