mirror of
https://github.com/bitwarden/server
synced 2025-12-17 16:53:23 +00:00
org user remove fixes
This commit is contained in:
@@ -797,6 +797,11 @@ namespace Bit.Core.Services
|
||||
throw new BadRequestException("User not valid.");
|
||||
}
|
||||
|
||||
if(orgUser.UserId == deletingUserId)
|
||||
{
|
||||
throw new BadRequestException("You cannot remove yourself.");
|
||||
}
|
||||
|
||||
var confirmedOwners = (await GetConfirmedOwnersAsync(organizationId)).ToList();
|
||||
if(confirmedOwners.Count == 1 && confirmedOwners[0].Id == organizationUserId)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user