mirror of
https://github.com/bitwarden/server.git
synced 2025-07-12 13:19:01 -05:00
[PM-13620]Existing user email linking to create-organization (#5315)
* Changes for the existing customer Signed-off-by: Cy Okeke <cokeke@bitwarden.com> * removed the added character Signed-off-by: Cy Okeke <cokeke@bitwarden.com> --------- Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
This commit is contained in:
@ -5,6 +5,7 @@ namespace Bit.Core.Billing.Models.Mail;
|
||||
|
||||
public class TrialInitiationVerifyEmail : RegisterVerifyEmail
|
||||
{
|
||||
public bool IsExistingUser { get; set; }
|
||||
/// <summary>
|
||||
/// See comment on <see cref="RegisterVerifyEmail"/>.<see cref="RegisterVerifyEmail.Url"/>
|
||||
/// </summary>
|
||||
@ -26,8 +27,18 @@ public class TrialInitiationVerifyEmail : RegisterVerifyEmail
|
||||
/// Currently we only support one product type at a time, despite Product being a collection.
|
||||
/// If we receive both PasswordManager and SecretsManager, we'll send the user to the PM trial route
|
||||
/// </summary>
|
||||
private string Route =>
|
||||
Product.Any(p => p == ProductType.PasswordManager)
|
||||
? "trial-initiation"
|
||||
: "secrets-manager-trial-initiation";
|
||||
private string Route
|
||||
{
|
||||
get
|
||||
{
|
||||
if (IsExistingUser)
|
||||
{
|
||||
return "create-organization";
|
||||
}
|
||||
|
||||
return Product.Any(p => p == ProductType.PasswordManager)
|
||||
? "trial-initiation"
|
||||
: "secrets-manager-trial-initiation";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user