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

Fix bulk api (#1335)

This commit is contained in:
Oscar Hinton
2021-05-17 20:07:41 +02:00
committed by GitHub
parent 785e788cb6
commit 2b6c5bcd31
2 changed files with 2 additions and 1 deletions

View File

@ -1539,7 +1539,7 @@ namespace Bit.Core.Services
}
var owners = filteredUsers.Where(u => u.Type == OrganizationUserType.Owner);
if (!owners.Any() && deletingUserId.HasValue && !await UserIsOwnerAsync(organizationId, deletingUserId.Value))
if (owners.Any() && deletingUserId.HasValue && !await UserIsOwnerAsync(organizationId, deletingUserId.Value))
{
throw new BadRequestException("Only owners can delete other owners.");
}