1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-28 13:15:12 +01:00

Determine self hosted from global settings (#1744)

This commit is contained in:
Matt Gibson 2021-12-07 10:52:36 -06:00 committed by GitHub
parent 9177ad1ca8
commit d7e92dae5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View File

@ -16,8 +16,14 @@
<td class="content-block last" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; margin: 0; -webkit-font-smoothing: antialiased; padding: 0; -webkit-text-size-adjust: none; text-align: center;" valign="top" align="center"> <td class="content-block last" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; margin: 0; -webkit-font-smoothing: antialiased; padding: 0; -webkit-text-size-adjust: none; text-align: center;" valign="top" align="center">
If you do not wish to join this organization, you can safely ignore this email. If you do not wish to join this organization, you can safely ignore this email.
{{#if OrganizationCanSponsor}} {{#if OrganizationCanSponsor}}
<br /> <p style="margin-top:10px">
<b style="margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;">Did you know?</b> Members of {{OrganizationName}} receive a complimentary Families subscription. Learn more at the following link: https://bitwarden.com/help/article/families-for-enterprise/ <b
style="margin: 0; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 16px; color: #333; line-height: 25px; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none;">
Did you know?
</b>
Members of {{OrganizationName}} receive a complimentary Families subscription. Learn more at the
following link: https://bitwarden.com/help/article/families-for-enterprise/
</p>
{{/if}} {{/if}}
</td> </td>
</tr> </tr>

View File

@ -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 return StaticStore.GetPlan(organization.PlanType).Product == ProductType.Enterprise
&& !organization.SelfHost; && !_globalSettings.SelfHosted;
} }
public async Task<OrganizationUser> AcceptUserAsync(Guid organizationUserId, User user, string token, public async Task<OrganizationUser> AcceptUserAsync(Guid organizationUserId, User user, string token,