1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-04 09:32:48 -05:00

Transition reference id to data (#828)

* Transition reference id to data

* field length and request model updates
This commit is contained in:
Chad Scharf
2020-07-20 15:19:46 -04:00
committed by GitHub
parent 036b402e9f
commit 83e9468502
15 changed files with 510 additions and 23 deletions

View File

@ -30,9 +30,9 @@ namespace Bit.Core.Services
private async Task SendMessageAsync(ReferenceEvent referenceEvent)
{
if (_globalSettings.SelfHosted || string.IsNullOrWhiteSpace(referenceEvent.ReferenceId))
if (_globalSettings.SelfHosted)
{
// Ignore for self-hosted, OR, where there is no ReferenceId
// Ignore for self-hosted
return;
}
try

View File

@ -514,7 +514,7 @@ namespace Bit.Core.Services
UsersGetPremium = plan.UsersGetPremium || signup.PremiumAccessAddon,
Plan = plan.Name,
Gateway = null,
ReferenceId = signup.Owner.ReferenceId,
ReferenceData = signup.Owner.ReferenceData,
Enabled = true,
LicenseKey = CoreHelpers.SecureRandomString(20),
ApiKey = CoreHelpers.SecureRandomString(30),
@ -598,7 +598,7 @@ namespace Bit.Core.Services
Gateway = null,
GatewayCustomerId = null,
GatewaySubscriptionId = null,
ReferenceId = owner.ReferenceId,
ReferenceData = owner.ReferenceData,
Enabled = license.Enabled,
ExpirationDate = license.Expires,
LicenseKey = license.LicenseKey,