From 1053491d28021ef0a93a054f90e05fc978f06f8f Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 11 Jul 2017 14:50:49 -0400 Subject: [PATCH] login model adjustments --- src/models/dataModels.js | 2 ++ src/models/domainModels.js | 2 ++ src/popup/app/vault/vaultViewLoginController.js | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/models/dataModels.js b/src/models/dataModels.js index 6b834ac0fb..009c905782 100644 --- a/src/models/dataModels.js +++ b/src/models/dataModels.js @@ -20,6 +20,8 @@ var LoginData = function (response, userId) { this.organizationId = response.organizationId; this.folderId = response.folderId; this.userId = userId; + this.edit = response.edit; + this.organizationUseTotp = response.organizationUseTotp; if (response instanceof LoginResponse) { this.name = response.name; diff --git a/src/models/domainModels.js b/src/models/domainModels.js index bf134e6f89..10c2cb6623 100644 --- a/src/models/domainModels.js +++ b/src/models/domainModels.js @@ -93,6 +93,8 @@ var Login = function (obj, alreadyEncrypted) { this.organizationId = obj.organizationId ? obj.organizationId : null; this.folderId = obj.folderId ? obj.folderId : null; this.favorite = obj.favorite ? true : false; + this.organizationUseTotp = obj.organizationUseTotp ? true : false; + this.edit = obj.edit ? true : false; if (alreadyEncrypted === true) { this.name = obj.name ? obj.name : null; diff --git a/src/popup/app/vault/vaultViewLoginController.js b/src/popup/app/vault/vaultViewLoginController.js index e60587b21d..e53af1997a 100644 --- a/src/popup/app/vault/vaultViewLoginController.js +++ b/src/popup/app/vault/vaultViewLoginController.js @@ -39,7 +39,7 @@ angular $scope.login.showLaunch = false; } - if (model.totp) { + if (model.totp && (login.organizationUseTotp || false)) { totpUpdateCode(); totpTick();