1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-22 12:15:36 +01:00

idGuid variable

This commit is contained in:
Kyle Spearrin 2018-02-24 14:32:48 -05:00
parent a5630f8af4
commit c4a6b3b7ef

View File

@ -420,8 +420,9 @@ namespace Bit.Api.Controllers
{
ValidateAttachment();
var idGuid = new Guid(id);
var userId = _userService.GetProperUserId(User).Value;
var cipher = await _cipherRepository.GetDetailsByIdAsync(new Guid(id));
var cipher = await _cipherRepository.GetDetailsByIdAsync(idGuid);
if(cipher == null || !cipher.OrganizationId.HasValue ||
!_currentContext.OrganizationAdmin(cipher.OrganizationId.Value))
{