1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +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

@@ -90,6 +90,7 @@ export class AccountProfile {
everBeenUnlocked?: boolean;
forcePasswordReset?: boolean;
hasPremiumPersonally?: boolean;
hasPremiumFromOrganization?: boolean;
lastSync?: string;
userId?: string;
usesKeyConnector?: boolean;

View File

@@ -9,7 +9,8 @@ export class ProfileResponse extends BaseResponse {
email: string;
emailVerified: boolean;
masterPasswordHint: string;
premium: boolean;
premiumPersonally: boolean;
premiumFromOrganization: boolean;
culture: string;
twoFactorEnabled: boolean;
key: string;
@@ -28,7 +29,8 @@ export class ProfileResponse extends BaseResponse {
this.email = this.getResponseProperty("Email");
this.emailVerified = this.getResponseProperty("EmailVerified");
this.masterPasswordHint = this.getResponseProperty("MasterPasswordHint");
this.premium = this.getResponseProperty("Premium");
this.premiumPersonally = this.getResponseProperty("Premium");
this.premiumFromOrganization = this.getResponseProperty("PremiumFromOrganization");
this.culture = this.getResponseProperty("Culture");
this.twoFactorEnabled = this.getResponseProperty("TwoFactorEnabled");
this.key = this.getResponseProperty("Key");