From fd04044be1fe7207e75ed7cb1ddb622cc9cc93bf Mon Sep 17 00:00:00 2001 From: Dominik Guzei Date: Thu, 10 Jan 2019 13:43:23 +0100 Subject: define workspaces as premium feature --- src/config.js | 1 + src/features/workspaces/index.js | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/config.js b/src/config.js index d7a485b8a..d327185f0 100644 --- a/src/config.js +++ b/src/config.js @@ -37,6 +37,7 @@ export const DEFAULT_FEATURES_CONFIG = { }, isServiceProxyEnabled: false, isServiceProxyPremiumFeature: true, + isWorkspacePremiumFeature: true, isWorkspaceEnabled: true, }; diff --git a/src/features/workspaces/index.js b/src/features/workspaces/index.js index b7e1090e8..b4cfd3c2d 100644 --- a/src/features/workspaces/index.js +++ b/src/features/workspaces/index.js @@ -13,7 +13,11 @@ export const state = observable(defaultState); export default function initWorkspaces(stores, actions) { const { features, user } = stores; reaction( - () => features.features.isWorkspaceEnabled && user.isLoggedIn, + () => ( + features.features.isWorkspaceEnabled && ( + !features.features.isWorkspacePremiumFeature || user.data.isPremium + ) + ), (isEnabled) => { if (isEnabled) { debug('Initializing `workspaces` feature'); -- cgit v1.2.3-54-g00ecf