mirror of
https://github.com/bitwarden/web
synced 2025-12-06 00:03:28 +00:00
[bug:euvr] Self-hosted instance hiding subscription nav item (#1669)
This commit is contained in:
committed by
Vincent Salucci
parent
34527160fc
commit
0543e76432
@@ -54,7 +54,11 @@ export class SettingsComponent implements OnInit, OnDestroy {
|
|||||||
this.premium = await this.tokenService.getPremium();
|
this.premium = await this.tokenService.getPremium();
|
||||||
this.hasFamilySponsorshipAvailable = await this.organizationService.canManageSponsorships();
|
this.hasFamilySponsorshipAvailable = await this.organizationService.canManageSponsorships();
|
||||||
const hasPremiumFromOrg = await this.stateService.getCanAccessPremium();
|
const hasPremiumFromOrg = await this.stateService.getCanAccessPremium();
|
||||||
const billing = await this.apiService.getUserBillingHistory();
|
let billing = null;
|
||||||
this.hideSubscription = !this.premium && hasPremiumFromOrg && billing.hasNoHistory;
|
if (!this.selfHosted) {
|
||||||
|
billing = await this.apiService.getUserBillingHistory();
|
||||||
|
}
|
||||||
|
this.hideSubscription =
|
||||||
|
!this.premium && hasPremiumFromOrg && (this.selfHosted || billing?.hasNoHistory);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user