mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-01 13:13:36 +01:00
[bug:euvr] Self-hosted instance hiding subscription nav item (#1669)
This commit is contained in:
parent
74bdfe2602
commit
e3e7fce70a
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user