From aa5b79df2b3e613090e60f486d308afd9ae6550c Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 20 Apr 2017 16:19:23 -0400 Subject: [PATCH] more user friendly error message for no access. --- src/Core/Services/Implementations/CipherService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Core/Services/Implementations/CipherService.cs b/src/Core/Services/Implementations/CipherService.cs index e803f51d10..d0afb7878b 100644 --- a/src/Core/Services/Implementations/CipherService.cs +++ b/src/Core/Services/Implementations/CipherService.cs @@ -44,7 +44,7 @@ namespace Bit.Core.Services { if(!(await UserCanEditAsync(cipher, savingUserId))) { - throw new BadRequestException("Not an admin."); + throw new BadRequestException("You do not have permissions to edit this."); } cipher.UserId = savingUserId; @@ -69,7 +69,7 @@ namespace Bit.Core.Services { if(!orgAdmin && !(await UserCanEditAsync(cipher, deletingUserId))) { - throw new BadRequestException("Not an admin."); + throw new BadRequestException("You do not have permissions to delete this."); } await _cipherRepository.DeleteAsync(cipher);