aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/ServicesStore.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/stores/ServicesStore.js')
-rw-r--r--src/stores/ServicesStore.js34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js
index 9b69cb7c6..9521f8493 100644
--- a/src/stores/ServicesStore.js
+++ b/src/stores/ServicesStore.js
@@ -18,8 +18,6 @@ import { matchRoute } from '../helpers/routing-helpers';
18import { isInTimeframe } from '../helpers/schedule-helpers'; 18import { isInTimeframe } from '../helpers/schedule-helpers';
19import { getRecipeDirectory, getDevRecipeDirectory } from '../helpers/recipe-helpers'; 19import { getRecipeDirectory, getDevRecipeDirectory } from '../helpers/recipe-helpers';
20import { workspaceStore } from '../features/workspaces'; 20import { workspaceStore } from '../features/workspaces';
21import { serviceLimitStore } from '../features/serviceLimit';
22import { RESTRICTION_TYPES } from '../models/Service';
23import { KEEP_WS_LOADED_USID } from '../config'; 21import { KEEP_WS_LOADED_USID } from '../config';
24import { SPELLCHECKER_LOCALES } from '../i18n/languages'; 22import { SPELLCHECKER_LOCALES } from '../i18n/languages';
25 23
@@ -94,7 +92,6 @@ export default class ServicesStore extends Store {
94 this._saveActiveService.bind(this), 92 this._saveActiveService.bind(this),
95 this._logoutReaction.bind(this), 93 this._logoutReaction.bind(this),
96 this._handleMuteSettings.bind(this), 94 this._handleMuteSettings.bind(this),
97 this._restrictServiceAccess.bind(this),
98 this._checkForActiveService.bind(this), 95 this._checkForActiveService.bind(this),
99 ]); 96 ]);
100 97
@@ -297,8 +294,6 @@ export default class ServicesStore extends Store {
297 async _createService({ 294 async _createService({
298 recipeId, serviceData, redirect = true, skipCleanup = false, 295 recipeId, serviceData, redirect = true, skipCleanup = false,
299 }) { 296 }) {
300 if (serviceLimitStore.userHasReachedServiceLimit) return;
301
302 if (!this.stores.recipes.isInstalled(recipeId)) { 297 if (!this.stores.recipes.isInstalled(recipeId)) {
303 debug(`Recipe "${recipeId}" is not installed, installing recipe`); 298 debug(`Recipe "${recipeId}" is not installed, installing recipe`);
304 await this.stores.recipes._install({ recipeId }); 299 await this.stores.recipes._install({ recipeId });
@@ -961,35 +956,6 @@ export default class ServicesStore extends Store {
961 return serviceData; 956 return serviceData;
962 } 957 }
963 958
964 _restrictServiceAccess() {
965 const { features } = this.stores.features;
966 const { userHasReachedServiceLimit, serviceLimit } = this.stores.serviceLimit;
967
968 this.all.map((service, index) => {
969 if (userHasReachedServiceLimit) {
970 service.isServiceAccessRestricted = index >= serviceLimit;
971
972 if (service.isServiceAccessRestricted) {
973 service.restrictionType = RESTRICTION_TYPES.SERVICE_LIMIT;
974
975 debug('Restricting access to server due to service limit');
976 }
977 }
978
979 if (service.isUsingCustomUrl) {
980 service.isServiceAccessRestricted = !features.isCustomUrlIncludedInCurrentPlan;
981
982 if (service.isServiceAccessRestricted) {
983 service.restrictionType = RESTRICTION_TYPES.CUSTOM_URL;
984
985 debug('Restricting access to server due to custom url');
986 }
987 }
988
989 return service;
990 });
991 }
992
993 _checkForActiveService() { 959 _checkForActiveService() {
994 if (!this.stores.router.location || this.stores.router.location.pathname.includes('auth/signup')) { 960 if (!this.stores.router.location || this.stores.router.location.pathname.includes('auth/signup')) {
995 return; 961 return;