1
0
mirror of https://github.com/bitwarden/server.git synced 2025-02-02 23:41:21 +01:00

check user access permissions on collections edit

This commit is contained in:
Kyle Spearrin 2018-08-23 23:04:44 -04:00
parent 68c349f72f
commit 0816c609db
2 changed files with 4 additions and 1 deletions

View File

@ -10,7 +10,6 @@ using Bit.Core.Services;
using Bit.Core;
using Bit.Api.Utilities;
using Bit.Core.Utilities;
using Core.Models.Data;
using System.Collections.Generic;
using Bit.Core.Models.Table;

View File

@ -478,6 +478,10 @@ namespace Bit.Core.Services
}
else
{
if(!(await UserCanEditAsync(cipher, savingUserId)))
{
throw new BadRequestException("You do not have permissions to edit this.");
}
await _collectionCipherRepository.UpdateCollectionsAsync(cipher.Id, savingUserId, collectionIds);
}