From acf332b689625e1f9179d4f9113e6f0c8d775d27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Filipe=20da=20Silva=20Bispo?= Date: Tue, 13 Sep 2022 17:56:10 +0100 Subject: [PATCH] [SG-659] Classic 2019 plans no longer generating TOTP codes for Free users (#3509) * [SG-659] Fixed TOTP code visibility for users with classic plans. * [SG-659] Refactored condition. * [SG-659] Ran prettier * [SG-659] Simplified expression. --- apps/browser/src/popup/vault/view.component.html | 7 ++----- apps/desktop/src/app/vault/view.component.html | 7 ++----- apps/web/src/app/vault/add-edit.component.html | 4 ++-- libs/angular/src/components/view.component.ts | 3 +++ 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/apps/browser/src/popup/vault/view.component.html b/apps/browser/src/popup/vault/view.component.html index e168879dd0..d8bf6da734 100644 --- a/apps/browser/src/popup/vault/view.component.html +++ b/apps/browser/src/popup/vault/view.component.html @@ -139,7 +139,7 @@
-
+
{{ "verificationCodeTotp" | i18n }} diff --git a/apps/desktop/src/app/vault/view.component.html b/apps/desktop/src/app/vault/view.component.html index 3d61373623..55da1b8e17 100644 --- a/apps/desktop/src/app/vault/view.component.html +++ b/apps/desktop/src/app/vault/view.component.html @@ -100,7 +100,7 @@
-
+
{{ "verificationCodeTotp" | i18n }} diff --git a/apps/web/src/app/vault/add-edit.component.html b/apps/web/src/app/vault/add-edit.component.html index 5ec27d0206..50c88c51dd 100644 --- a/apps/web/src/app/vault/add-edit.component.html +++ b/apps/web/src/app/vault/add-edit.component.html @@ -182,7 +182,7 @@
15 @@ -237,7 +237,7 @@
diff --git a/libs/angular/src/components/view.component.ts b/libs/angular/src/components/view.component.ts index 66dbae786c..cbd88383f5 100644 --- a/libs/angular/src/components/view.component.ts +++ b/libs/angular/src/components/view.component.ts @@ -50,6 +50,7 @@ export class ViewComponent implements OnDestroy, OnInit { showCardNumber: boolean; showCardCode: boolean; canAccessPremium: boolean; + showPremiumRequiredTotp: boolean; totpCode: string; totpCodeFormatted: string; totpDash: number; @@ -108,6 +109,8 @@ export class ViewComponent implements OnDestroy, OnInit { const cipher = await this.cipherService.get(this.cipherId); this.cipher = await cipher.decrypt(); this.canAccessPremium = await this.stateService.getCanAccessPremium(); + this.showPremiumRequiredTotp = + this.cipher.login.totp && !this.canAccessPremium && !this.cipher.organizationUseTotp; if ( this.cipher.type === CipherType.Login &&