mirror of
https://github.com/bitwarden/server.git
synced 2025-04-07 05:58:13 -05: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;
|
StripeCustomer customer = null;
|
||||||
StripeSubscription subscription = 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)
|
if(!plan.CanBuyAdditionalSeats && signup.AdditionalSeats > 0)
|
||||||
{
|
{
|
||||||
throw new BadRequestException("Plan does not allow additional users.");
|
throw new BadRequestException("Plan does not allow additional users.");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user