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

pass org admin flag for attachment actions

This commit is contained in:
Kyle Spearrin 2019-02-12 11:49:35 -05:00
parent 5cdfc83903
commit cc2cef5b27

View File

@ -477,7 +477,7 @@ namespace Bit.Api.Controllers
await Request.GetFileAsync(async (stream, fileName, key) =>
{
await _cipherService.CreateAttachmentAsync(cipher, stream, fileName, key,
Request.ContentLength.GetValueOrDefault(0), userId);
Request.ContentLength.GetValueOrDefault(0), userId, true);
});
return new CipherResponseModel(cipher, _globalSettings);
@ -532,7 +532,7 @@ namespace Bit.Api.Controllers
throw new NotFoundException();
}
await _cipherService.DeleteAttachmentAsync(cipher, attachmentId, userId, false);
await _cipherService.DeleteAttachmentAsync(cipher, attachmentId, userId, true);
}
private void ValidateAttachment()