mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 15:42:48 -05:00
Require valid Send-Id header for access requests (#1381)
* Require valid Send-Id header for access requests * Require valid Send-Id header for Send file access * Add ICurrentContext to Send controller test
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
using AutoFixture.Xunit2;
|
||||
using Bit.Api.Controllers;
|
||||
using Bit.Core.Context;
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Models.Api;
|
||||
using Bit.Core.Models.Table;
|
||||
@ -28,6 +29,7 @@ namespace Bit.Api.Test.Controllers
|
||||
private readonly ISendService _sendService;
|
||||
private readonly ISendFileStorageService _sendFileStorageService;
|
||||
private readonly ILogger<SendsController> _logger;
|
||||
private readonly ICurrentContext _currentContext;
|
||||
|
||||
public SendsControllerTests()
|
||||
{
|
||||
@ -37,6 +39,7 @@ namespace Bit.Api.Test.Controllers
|
||||
_sendFileStorageService = Substitute.For<ISendFileStorageService>();
|
||||
_globalSettings = new GlobalSettings();
|
||||
_logger = Substitute.For<ILogger<SendsController>>();
|
||||
_currentContext = Substitute.For<ICurrentContext>();
|
||||
|
||||
_sut = new SendsController(
|
||||
_sendRepository,
|
||||
@ -44,7 +47,8 @@ namespace Bit.Api.Test.Controllers
|
||||
_sendService,
|
||||
_sendFileStorageService,
|
||||
_logger,
|
||||
_globalSettings
|
||||
_globalSettings,
|
||||
_currentContext
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user