mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 15:42:48 -05:00
EC-262 - add missing validation on deactivate (#2064)
This commit is contained in:
@ -2244,6 +2244,11 @@ namespace Bit.Core.Services
|
||||
{
|
||||
try
|
||||
{
|
||||
if (organizationUser.Status == OrganizationUserStatusType.Deactivated)
|
||||
{
|
||||
throw new BadRequestException("Already deactivated.");
|
||||
}
|
||||
|
||||
if (disablingUserId.HasValue && organizationUser.UserId == disablingUserId)
|
||||
{
|
||||
throw new BadRequestException("You cannot deactivate yourself.");
|
||||
|
Reference in New Issue
Block a user