1
0
mirror of https://github.com/bitwarden/server.git synced 2025-02-17 02:01:53 +01: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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.");
}