1
0
mirror of https://github.com/bitwarden/server.git synced 2025-02-23 03:01:23 +01:00

1 seat required

This commit is contained in:
Kyle Spearrin 2017-05-20 15:33:17 -04:00
parent 2ad365706c
commit 9db19fa540

View File

@ -384,6 +384,11 @@ namespace Bit.Core.Services
throw new BadRequestException($"Plan has a minimum of {plan.BaseSeats} seats.");
}
if(newSeatTotal <= 0)
{
throw new BadRequestException("You must have at least 1 seat.");
}
var additionalSeats = newSeatTotal - plan.BaseSeats;
if(plan.MaxAdditionalSeats.HasValue && additionalSeats > plan.MaxAdditionalSeats.Value)
{