mirror of
https://github.com/bitwarden/server.git
synced 2024-11-26 12:55:17 +01:00
pass org admin flag for attachment actions
This commit is contained in:
parent
5cdfc83903
commit
cc2cef5b27
@ -477,7 +477,7 @@ namespace Bit.Api.Controllers
|
|||||||
await Request.GetFileAsync(async (stream, fileName, key) =>
|
await Request.GetFileAsync(async (stream, fileName, key) =>
|
||||||
{
|
{
|
||||||
await _cipherService.CreateAttachmentAsync(cipher, 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);
|
return new CipherResponseModel(cipher, _globalSettings);
|
||||||
@ -532,7 +532,7 @@ namespace Bit.Api.Controllers
|
|||||||
throw new NotFoundException();
|
throw new NotFoundException();
|
||||||
}
|
}
|
||||||
|
|
||||||
await _cipherService.DeleteAttachmentAsync(cipher, attachmentId, userId, false);
|
await _cipherService.DeleteAttachmentAsync(cipher, attachmentId, userId, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ValidateAttachment()
|
private void ValidateAttachment()
|
||||||
|
Loading…
Reference in New Issue
Block a user