From bed2a0ab7b251bab960c03a6b4cf808246555a6a Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 18 Sep 2019 10:52:53 -0400 Subject: [PATCH] no additional storage for premium --- src/Core/Services/Implementations/UserService.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Core/Services/Implementations/UserService.cs b/src/Core/Services/Implementations/UserService.cs index 948e215e41..e1e297fcc9 100644 --- a/src/Core/Services/Implementations/UserService.cs +++ b/src/Core/Services/Implementations/UserService.cs @@ -692,6 +692,12 @@ namespace Bit.Core.Services throw new BadRequestException("You can't subtract storage!"); } + if((paymentMethodType == PaymentMethodType.GoogleInApp || + paymentMethodType == PaymentMethodType.AppleInApp) && additionalStorageGb > 0) + { + throw new BadRequestException("You cannot add storage with this payment method."); + } + string paymentIntentClientSecret = null; IPaymentService paymentService = null; if(_globalSettings.SelfHosted)