mirror of
https://github.com/bitwarden/server.git
synced 2024-11-26 12:55:17 +01:00
[EC-529] fix: missing constructor DI assignment (#2258)
* [EC-529] fix: missing constructor DI assignment * [EC-239] fix: move logging to CiphersController
This commit is contained in:
parent
70f16bc069
commit
e2b6f2a5bb
@ -222,6 +222,12 @@ public class CiphersController : Controller
|
|||||||
var responses = orgCiphers.Select(c => new CipherMiniDetailsResponseModel(c, _globalSettings,
|
var responses = orgCiphers.Select(c => new CipherMiniDetailsResponseModel(c, _globalSettings,
|
||||||
collectionCiphersGroupDict, c.OrganizationUseTotp));
|
collectionCiphersGroupDict, c.OrganizationUseTotp));
|
||||||
|
|
||||||
|
var providerId = await _currentContext.ProviderIdForOrg(orgIdGuid);
|
||||||
|
if (providerId.HasValue)
|
||||||
|
{
|
||||||
|
await _providerService.LogProviderAccessToOrganizationAsync(orgIdGuid);
|
||||||
|
}
|
||||||
|
|
||||||
return new ListResponseModel<CipherMiniDetailsResponseModel>(responses);
|
return new ListResponseModel<CipherMiniDetailsResponseModel>(responses);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,6 @@ public class CipherService : ICipherService
|
|||||||
private const long _fileSizeLeeway = 1024L * 1024L; // 1MB
|
private const long _fileSizeLeeway = 1024L * 1024L; // 1MB
|
||||||
private readonly IReferenceEventService _referenceEventService;
|
private readonly IReferenceEventService _referenceEventService;
|
||||||
private readonly ICurrentContext _currentContext;
|
private readonly ICurrentContext _currentContext;
|
||||||
private readonly IProviderService _providerService;
|
|
||||||
|
|
||||||
public CipherService(
|
public CipherService(
|
||||||
ICipherRepository cipherRepository,
|
ICipherRepository cipherRepository,
|
||||||
@ -876,12 +875,6 @@ public class CipherService : ICipherService
|
|||||||
.Where(c => orgCipherIds.Contains(c.CipherId))
|
.Where(c => orgCipherIds.Contains(c.CipherId))
|
||||||
.GroupBy(c => c.CipherId).ToDictionary(s => s.Key);
|
.GroupBy(c => c.CipherId).ToDictionary(s => s.Key);
|
||||||
|
|
||||||
var providerId = await _currentContext.ProviderIdForOrg(organizationId);
|
|
||||||
if (providerId.HasValue)
|
|
||||||
{
|
|
||||||
await _providerService.LogProviderAccessToOrganizationAsync(organizationId);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (orgCiphers, collectionCiphersGroupDict);
|
return (orgCiphers, collectionCiphersGroupDict);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user