diff --git a/src/app/organization/organizationPeopleEditController.js b/src/app/organization/organizationPeopleEditController.js index 270858e538..81866796c2 100644 --- a/src/app/organization/organizationPeopleEditController.js +++ b/src/app/organization/organizationPeopleEditController.js @@ -13,8 +13,8 @@ }); apiService.organizationUsers.get({ orgId: $state.params.orgId, id: id }, function (user) { + var subvaults = {}; if (user && user.Subvaults) { - var subvaults = {}; for (var i = 0; i < user.Subvaults.Data.length; i++) { subvaults[user.Subvaults.Data[i].SubvaultId] = { subvaultId: user.Subvaults.Data[i].SubvaultId, diff --git a/src/app/services/authService.js b/src/app/services/authService.js index b761c4001c..82de919f03 100644 --- a/src/app/services/authService.js +++ b/src/app/services/authService.js @@ -87,16 +87,16 @@ angular profile.Organizations = []; } - var org = { + var o = { id: org.Id, name: org.Name, key: org.Key, status: org.Status }; - profile.organizations.push(org); + profile.organizations.push(o); _userProfile = profile; - cryptoService.addOrgKey(org); + cryptoService.addOrgKey(o); } }; diff --git a/src/app/services/cipherService.js b/src/app/services/cipherService.js index 84ebdc4a6b..f27abff3cc 100644 --- a/src/app/services/cipherService.js +++ b/src/app/services/cipherService.js @@ -133,7 +133,7 @@ angular } return property; - } + }; _service.encryptLogins = function (unencryptedLogins, key) { if (!unencryptedLogins) throw "unencryptedLogins is undefined or null"; diff --git a/src/app/services/cryptoService.js b/src/app/services/cryptoService.js index 6757551f82..60c73105c4 100644 --- a/src/app/services/cryptoService.js +++ b/src/app/services/cryptoService.js @@ -18,7 +18,7 @@ angular try { var privateKeyBytes = _service.decrypt(privateKeyCt, key, 'raw'); $sessionStorage.privateKey = forge.util.encode64(privateKeyBytes); - _privateKey = forge.pki.privateKeyFromAsn1(forge.asn1.fromDer(privateKeyBytes));; + _privateKey = forge.pki.privateKeyFromAsn1(forge.asn1.fromDer(privateKeyBytes)); } catch (e) { console.log('Cannot set private key. Decryption failed.'); @@ -171,7 +171,7 @@ angular } return orgKeys[orgId]; - } + }; _service.clearKey = function () { _key = _b64Key = null;