1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 16:12:49 -05:00

license hash

This commit is contained in:
Kyle Spearrin
2017-08-16 15:16:56 -04:00
parent 92ab3db4c4
commit d9cd7880a6
4 changed files with 55 additions and 11 deletions

View File

@ -152,7 +152,7 @@ namespace Bit.Core.Services
if(!organization.Seats.HasValue || organization.Seats.Value > newPlanSeats)
{
var userCount = await _organizationUserRepository.GetCountByOrganizationIdAsync(organization.Id);
if(userCount >= newPlanSeats)
if(userCount > newPlanSeats)
{
throw new BadRequestException($"Your organization currently has {userCount} seats filled. Your new plan " +
$"only has ({newPlanSeats}) seats. Remove some users.");
@ -651,7 +651,7 @@ namespace Bit.Core.Services
if(license.Seats.HasValue && (!organization.Seats.HasValue || organization.Seats.Value > license.Seats.Value))
{
var userCount = await _organizationUserRepository.GetCountByOrganizationIdAsync(organization.Id);
if(userCount >= license.Seats.Value)
if(userCount > license.Seats.Value)
{
throw new BadRequestException($"Your organization currently has {userCount} seats filled. " +
$"Your new license only has ({ license.Seats.Value}) seats. Remove some users.");