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:
parent
35a31a4496
commit
f194551afc
@ -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.");
|
||||
|
Loading…
Reference in New Issue
Block a user