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

[PM-19703] Fix admin count logic to exclude current organization (#5918)

This commit is contained in:
Jimmy Vo
2025-06-13 16:27:48 -04:00
committed by GitHub
parent db77201ca4
commit 4a12120950
6 changed files with 126 additions and 40 deletions

View File

@@ -177,9 +177,10 @@ public class MembersController : Controller
{
return new NotFoundResult();
}
var existingUserType = existingUser.Type;
var updatedUser = model.ToOrganizationUser(existingUser);
var associations = model.Collections?.Select(c => c.ToCollectionAccessSelection()).ToList();
await _updateOrganizationUserCommand.UpdateUserAsync(updatedUser, null, associations, model.Groups);
await _updateOrganizationUserCommand.UpdateUserAsync(updatedUser, existingUserType, null, associations, model.Groups);
MemberResponseModel response = null;
if (existingUser.UserId.HasValue)
{