1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 23:52:50 -05:00

Add Additional Logging to Self-hosted installs for F4E (#1999)

* Add logging to SH logs

* Fix tests
This commit is contained in:
Justin Baur
2022-05-16 09:57:00 -04:00
committed by GitHub
parent 6b484e29a7
commit 53241f16e0
5 changed files with 56 additions and 7 deletions

View File

@ -74,6 +74,10 @@ namespace Bit.Api.Controllers
case OrganizationConnectionType.CloudBillingSync:
var typedModel = new OrganizationConnectionRequestModel<BillingSyncConfig>(model);
var license = await _licensingService.ReadOrganizationLicenseAsync(model.OrganizationId);
if (!_licensingService.VerifyLicense(license))
{
throw new BadRequestException("Cannot verify license file.");
}
typedModel.ParsedConfig.CloudOrganizationId = license.Id;
var connection = await _createOrganizationConnectionCommand.CreateAsync(typedModel.ToData());
return new OrganizationConnectionResponseModel(connection, typeof(BillingSyncConfig));