From 5187f4c15f10af2613c8447e44c731e7c82d2841 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 3 Apr 2017 13:24:49 -0400 Subject: [PATCH] owner check when editing --- src/Core/Services/Implementations/OrganizationService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Core/Services/Implementations/OrganizationService.cs b/src/Core/Services/Implementations/OrganizationService.cs index 9cdbf62ec..e1eacddd0 100644 --- a/src/Core/Services/Implementations/OrganizationService.cs +++ b/src/Core/Services/Implementations/OrganizationService.cs @@ -243,7 +243,7 @@ namespace Bit.Core.Services } var confirmedOwners = (await GetConfirmedOwnersAsync(user.OrganizationId)).ToList(); - if(confirmedOwners.Count == 1 && confirmedOwners[0].Id == user.Id) + if(user.Type != Enums.OrganizationUserType.Owner && confirmedOwners.Count == 1 && confirmedOwners[0].Id == user.Id) { throw new BadRequestException("Organization must have at least one confirmed owner."); }