1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 08:02:49 -05:00

permissions validation

This commit is contained in:
Kyle Spearrin
2017-04-04 22:07:30 -04:00
parent 7d9a2cdd95
commit 382be7a90b
5 changed files with 22 additions and 16 deletions

View File

@ -134,7 +134,7 @@ namespace Bit.Api.Controllers
{
var userId = _userService.GetProperUserId(User).Value;
var cipher = await _cipherRepository.GetByIdAsync(new Guid(id), userId);
if(cipher == null || cipher.OrganizationId.HasValue || cipher.UserId != userId)
if(cipher == null || cipher.UserId != userId)
{
throw new NotFoundException();
}