Hide the selfHost for teams and free plan (#10692)

This commit is contained in:
cyprain-okeke 2024-08-30 17:26:25 +01:00 committed by GitHub
parent 6bc74546e4
commit c0fbb5ce39
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 3 deletions

View File

@ -222,8 +222,10 @@
</ng-container>
</ng-container>
<h2 bitTypography="h2" class="tw-mt-7">{{ "selfHostingTitle" | i18n }}</h2>
<p bitTypography="body1">
<h2 bitTypography="h2" *ngIf="shownSelfHost()" class="tw-mt-7">
{{ "selfHostingTitle" | i18n }}
</h2>
<p bitTypography="body1" *ngIf="shownSelfHost()">
{{ "selfHostingEnterpriseOrganizationSectionCopy" | i18n }}
<a
href="https://bitwarden.com/help/licensing-on-premise/#retrieve-organization-license"
@ -240,7 +242,7 @@
buttonType="secondary"
type="button"
(click)="downloadLicense()"
*ngIf="canDownloadLicense"
*ngIf="canDownloadLicense && shownSelfHost()"
[disabled]="showDownloadLicense"
>
{{ "downloadLicense" | i18n }}

View File

@ -345,6 +345,13 @@ export class OrganizationSubscriptionCloudComponent implements OnInit, OnDestroy
);
}
shownSelfHost(): boolean {
return (
this.sub?.plan.productTier !== ProductTierType.Teams &&
this.sub?.plan.productTier !== ProductTierType.Free
);
}
cancelSubscription = async () => {
const reference = openOffboardingSurvey(this.dialogService, {
data: {