From d7e92dae5bd18a2f35ce3e5d7568c291cdbbf17d Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Tue, 7 Dec 2021 10:52:36 -0600 Subject: [PATCH] Determine self hosted from global settings (#1744) --- .../Handlebars/OrganizationUserInvited.html.hbs | 10 ++++++++-- .../Services/Implementations/OrganizationService.cs | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/Core/MailTemplates/Handlebars/OrganizationUserInvited.html.hbs b/src/Core/MailTemplates/Handlebars/OrganizationUserInvited.html.hbs index 2491040597..9233e7f66d 100644 --- a/src/Core/MailTemplates/Handlebars/OrganizationUserInvited.html.hbs +++ b/src/Core/MailTemplates/Handlebars/OrganizationUserInvited.html.hbs @@ -16,8 +16,14 @@ If you do not wish to join this organization, you can safely ignore this email. {{#if OrganizationCanSponsor}} -
- Did you know? Members of {{OrganizationName}} receive a complimentary Families subscription. Learn more at the following link: https://bitwarden.com/help/article/families-for-enterprise/ +

+ + Did you know? + + Members of {{OrganizationName}} receive a complimentary Families subscription. Learn more at the + following link: https://bitwarden.com/help/article/families-for-enterprise/ +

{{/if}} diff --git a/src/Core/Services/Implementations/OrganizationService.cs b/src/Core/Services/Implementations/OrganizationService.cs index 246263360b..64a441d4f6 100644 --- a/src/Core/Services/Implementations/OrganizationService.cs +++ b/src/Core/Services/Implementations/OrganizationService.cs @@ -1278,10 +1278,10 @@ namespace Bit.Core.Services } - private static bool CheckOrganizationCanSponsor(Organization organization) + private bool CheckOrganizationCanSponsor(Organization organization) { return StaticStore.GetPlan(organization.PlanType).Product == ProductType.Enterprise - && !organization.SelfHost; + && !_globalSettings.SelfHosted; } public async Task AcceptUserAsync(Guid organizationUserId, User user, string token,