1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-22 19:23:52 +00:00

[EC-243] Grant premium status when member accepts org invite (#2870)

* Rename setCanAccessPremium to setHasPremiumPersonally

* Add hasPremiumFromOrganization

* Refactor stateService methods

* Add getHasPremiumPersonally, deprecate tokenService.getPremium
This commit is contained in:
Thomas Rittson
2022-06-14 12:13:41 +10:00
committed by GitHub
parent 29f95cdb7d
commit b92685dcd9
11 changed files with 52 additions and 27 deletions

View File

@@ -51,9 +51,9 @@ export class SettingsComponent implements OnInit, OnDestroy {
}
async load() {
this.premium = await this.tokenService.getPremium();
this.premium = await this.stateService.getHasPremiumPersonally();
this.hasFamilySponsorshipAvailable = await this.organizationService.canManageSponsorships();
const hasPremiumFromOrg = await this.stateService.getCanAccessPremium();
const hasPremiumFromOrg = await this.stateService.getHasPremiumFromOrganization();
let billing = null;
if (!this.selfHosted) {
billing = await this.apiService.getUserBillingHistory();