mirror of
https://github.com/bitwarden/browser
synced 2026-01-08 11:33:28 +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:
@@ -5,7 +5,7 @@ import { ApiService } from "jslib-common/abstractions/api.service";
|
||||
import { I18nService } from "jslib-common/abstractions/i18n.service";
|
||||
import { LogService } from "jslib-common/abstractions/log.service";
|
||||
import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service";
|
||||
import { TokenService } from "jslib-common/abstractions/token.service";
|
||||
import { StateService } from "jslib-common/abstractions/state.service";
|
||||
import { SubscriptionResponse } from "jslib-common/models/response/subscriptionResponse";
|
||||
|
||||
@Component({
|
||||
@@ -25,7 +25,7 @@ export class UserSubscriptionComponent implements OnInit {
|
||||
reinstatePromise: Promise<any>;
|
||||
|
||||
constructor(
|
||||
private tokenService: TokenService,
|
||||
private stateService: StateService,
|
||||
private apiService: ApiService,
|
||||
private platformUtilsService: PlatformUtilsService,
|
||||
private i18nService: I18nService,
|
||||
@@ -45,7 +45,7 @@ export class UserSubscriptionComponent implements OnInit {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.tokenService.getPremium()) {
|
||||
if (this.stateService.getHasPremiumPersonally()) {
|
||||
this.loading = true;
|
||||
this.sub = await this.apiService.getUserSubscription();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user