diff options
author | 2019-08-08 16:49:10 +0200 | |
---|---|---|
committer | 2019-08-08 16:49:10 +0200 | |
commit | 9ccfa8c6232b7a9f66c49461250cd9357e36bc95 (patch) | |
tree | 9c2202984c82bebcea78c348c838b2663d187c7e | |
parent | WIP: add option to activate trial (diff) | |
download | ferdium-app-9ccfa8c6232b7a9f66c49461250cd9357e36bc95.tar.gz ferdium-app-9ccfa8c6232b7a9f66c49461250cd9357e36bc95.tar.zst ferdium-app-9ccfa8c6232b7a9f66c49461250cd9357e36bc95.zip |
Fix service restriction on pro plan
-rw-r--r-- | src/stores/ServicesStore.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index 513295b5e..e3b3fcf21 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js | |||
@@ -693,18 +693,20 @@ export default class ServicesStore extends Store { | |||
693 | this.all.map((service, index) => { | 693 | this.all.map((service, index) => { |
694 | if (userHasReachedServiceLimit) { | 694 | if (userHasReachedServiceLimit) { |
695 | service.isServiceAccessRestricted = index >= serviceLimit; | 695 | service.isServiceAccessRestricted = index >= serviceLimit; |
696 | service.restrictionType = RESTRICTION_TYPES.SERVICE_LIMIT; | ||
697 | 696 | ||
698 | if (index >= serviceLimit) { | 697 | if (service.isServiceAccessRestricted) { |
698 | service.restrictionType = RESTRICTION_TYPES.SERVICE_LIMIT; | ||
699 | |||
699 | debug('Restricting access to server due to service limit'); | 700 | debug('Restricting access to server due to service limit'); |
700 | } | 701 | } |
701 | } | 702 | } |
702 | 703 | ||
703 | if (service.isUsingCustomUrl) { | 704 | if (service.isUsingCustomUrl) { |
704 | service.isServiceAccessRestricted = features.isCustomUrlIncludedInCurrentPlan; | 705 | service.isServiceAccessRestricted = !features.isCustomUrlIncludedInCurrentPlan; |
705 | service.restrictionType = RESTRICTION_TYPES.CUSTOM_URL; | 706 | |
707 | if (service.isServiceAccessRestricted) { | ||
708 | service.restrictionType = RESTRICTION_TYPES.CUSTOM_URL; | ||
706 | 709 | ||
707 | if (features.isCustomUrlIncludedInCurrentPlan) { | ||
708 | debug('Restricting access to server due to custom url'); | 710 | debug('Restricting access to server due to custom url'); |
709 | } | 711 | } |
710 | } | 712 | } |