From d6ed8291e644593bc1047ee2175d96f56e61fafe Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 2 Apr 2020 20:31:02 -0400 Subject: [PATCH] Only apply count restriction to non-deleted users (#685) --- src/Api/Controllers/OrganizationsController.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Api/Controllers/OrganizationsController.cs b/src/Api/Controllers/OrganizationsController.cs index d5e3adc2be..7e2b5fc8a3 100644 --- a/src/Api/Controllers/OrganizationsController.cs +++ b/src/Api/Controllers/OrganizationsController.cs @@ -374,7 +374,8 @@ namespace Bit.Api.Controllers [HttpPost("{id}/import")] public async Task Import(string id, [FromBody]ImportOrganizationUsersRequestModel model) { - if (!_globalSettings.SelfHosted && (model.Groups.Count() > 200 || model.Users.Count() > 1000)) + if (!_globalSettings.SelfHosted && + (model.Groups.Count() > 200 || model.Users.Count(u => !u.Deleted) > 1000)) { throw new BadRequestException("You cannot import this much data at once."); }