mirror of
https://github.com/bitwarden/server.git
synced 2025-02-22 02:51:33 +01:00
EC-262 - add missing validation on deactivate (#2064)
This commit is contained in:
parent
3360d40592
commit
ee5946c4b9
@ -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.");
|
||||
|
Loading…
Reference in New Issue
Block a user