diff --git a/src/popup/app/vault/views/vault.html b/src/popup/app/vault/views/vault.html
index b02d2fc80ec..4c80fcd083d 100644
--- a/src/popup/app/vault/views/vault.html
+++ b/src/popup/app/vault/views/vault.html
@@ -46,7 +46,10 @@
data-clipboard-text="{{login.username}}" ng-class="{'disabled': !login.username}">
- {{login.name}}
+
+ {{login.name}}
+
+
{{login.username}}
diff --git a/src/services/loginService.js b/src/services/loginService.js
index f203b1cde0e..5148f337ea0 100644
--- a/src/services/loginService.js
+++ b/src/services/loginService.js
@@ -17,21 +17,26 @@ function initLoginService() {
var model = {
id: login.id,
folderId: login.folderId,
- favorite: login.favorite
+ favorite: login.favorite,
+ organizationId: login.organizationId
};
- return cryptoService.encrypt(login.name).then(function (cs) {
+ var orgKey = null;
+ return cryptoService.getOrgKey(login.organizationId).then(function (key) {
+ orgKey = key;
+ return cryptoService.encrypt(login.name, orgKey);
+ }).then(function (cs) {
model.name = cs;
- return cryptoService.encrypt(login.uri);
+ return cryptoService.encrypt(login.uri, orgKey);
}).then(function (cs) {
model.uri = cs;
- return cryptoService.encrypt(login.username);
+ return cryptoService.encrypt(login.username, orgKey);
}).then(function (cs) {
model.username = cs;
- return cryptoService.encrypt(login.password);
+ return cryptoService.encrypt(login.password, orgKey);
}).then(function (cs) {
model.password = cs;
- return cryptoService.encrypt(login.notes);
+ return cryptoService.encrypt(login.notes, orgKey);
}).then(function (cs) {
model.notes = cs;
return model;