1
0
mirror of https://github.com/bitwarden/server synced 2025-12-14 15:23:42 +00:00

[PM-20084] [PM-20086] Add TrialLength parameter to trial initiation endpoint and email (#5770)

* Add trial length parameter to trial initiation endpoint and email

* Add feature flag that pegs trial length to 7 when disabled

* Add optionality to Identity

* Move feature service injection to identity accounts controller
This commit is contained in:
Alex Morask
2025-05-08 10:43:19 -04:00
committed by GitHub
parent e4a93b24f1
commit c9b6e5de86
13 changed files with 67 additions and 13 deletions

View File

@@ -84,7 +84,8 @@ public class HandlebarsMailService : IMailService
string email,
string token,
ProductTierType productTier,
IEnumerable<ProductType> products)
IEnumerable<ProductType> products,
int trialLength)
{
var message = CreateDefaultMessage("Verify your email", email);
var model = new TrialInitiationVerifyEmail
@@ -95,7 +96,8 @@ public class HandlebarsMailService : IMailService
WebVaultUrl = _globalSettings.BaseServiceUri.VaultWithHash,
SiteName = _globalSettings.SiteName,
ProductTier = productTier,
Product = products
Product = products,
TrialLength = trialLength
};
await AddMessageContentAsync(message, "Billing.TrialInitiationVerifyEmail", model);
message.MetaData.Add("SendGridBypassListManagement", true);