1
0
mirror of https://github.com/bitwarden/server.git synced 2024-12-24 17:17:40 +01:00

more user friendly error message for no access.

This commit is contained in:
Kyle Spearrin 2017-04-20 16:19:23 -04:00
parent 8f6406501c
commit aa5b79df2b

View File

@ -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);