1
0
mirror of https://github.com/bitwarden/server synced 2025-12-14 23:33:41 +00:00

Only apply count restriction to non-deleted users (#685)

This commit is contained in:
Kyle Spearrin
2020-04-02 20:31:02 -04:00
committed by GitHub
parent 168f0314f8
commit d6ed8291e6

View File

@@ -374,7 +374,8 @@ namespace Bit.Api.Controllers
[HttpPost("{id}/import")] [HttpPost("{id}/import")]
public async Task Import(string id, [FromBody]ImportOrganizationUsersRequestModel model) 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."); throw new BadRequestException("You cannot import this much data at once.");
} }