1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-22 12:15:36 +01:00

seat check when signing up

This commit is contained in:
Kyle Spearrin 2017-05-19 20:30:25 -04:00
parent 35a31a4496
commit f194551afc

View File

@ -486,6 +486,11 @@ namespace Bit.Core.Services
StripeCustomer customer = null;
StripeSubscription subscription = null;
if(plan.BaseSeats + signup.AdditionalSeats <= 0)
{
throw new BadRequestException("You do not have any seats!");
}
if(!plan.CanBuyAdditionalSeats && signup.AdditionalSeats > 0)
{
throw new BadRequestException("Plan does not allow additional users.");