mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 16:12:49 -05: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