mirror of
https://github.com/bitwarden/server.git
synced 2025-04-04 20:50:21 -05:00
[PM-12765] Change error message when subscription canceled and attemp… (#5346)
This commit is contained in:
parent
17f5c97891
commit
bc27ec2b9b
@ -1294,6 +1294,12 @@ public class OrganizationService : IOrganizationService
|
||||
}
|
||||
}
|
||||
|
||||
var subscription = await _paymentService.GetSubscriptionAsync(organization);
|
||||
if (subscription?.Subscription?.Status == StripeConstants.SubscriptionStatus.Canceled)
|
||||
{
|
||||
return (false, "You do not have an active subscription. Reinstate your subscription to make changes");
|
||||
}
|
||||
|
||||
if (organization.Seats.HasValue &&
|
||||
organization.MaxAutoscaleSeats.HasValue &&
|
||||
organization.MaxAutoscaleSeats.Value < organization.Seats.Value + seatsToAdd)
|
||||
@ -1301,12 +1307,6 @@ public class OrganizationService : IOrganizationService
|
||||
return (false, $"Seat limit has been reached.");
|
||||
}
|
||||
|
||||
var subscription = await _paymentService.GetSubscriptionAsync(organization);
|
||||
if (subscription?.Subscription?.Status == StripeConstants.SubscriptionStatus.Canceled)
|
||||
{
|
||||
return (false, "Cannot autoscale with a canceled subscription.");
|
||||
}
|
||||
|
||||
return (true, failureReason);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user