mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
encrypt login with org key
This commit is contained in:
@@ -46,7 +46,10 @@
|
|||||||
data-clipboard-text="{{login.username}}" ng-class="{'disabled': !login.username}">
|
data-clipboard-text="{{login.username}}" ng-class="{'disabled': !login.username}">
|
||||||
<i class="fa fa-lg fa-user"></i>
|
<i class="fa fa-lg fa-user"></i>
|
||||||
</span>
|
</span>
|
||||||
<span class="text">{{login.name}}</span>
|
<span class="text">
|
||||||
|
{{login.name}}
|
||||||
|
<i class="fa fa-share-alt text-muted" ng-if="login.organizationId" title="Shared"></i>
|
||||||
|
</span>
|
||||||
<span class="detail">{{login.username}}</span>
|
<span class="detail">{{login.username}}</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -17,21 +17,26 @@ function initLoginService() {
|
|||||||
var model = {
|
var model = {
|
||||||
id: login.id,
|
id: login.id,
|
||||||
folderId: login.folderId,
|
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;
|
model.name = cs;
|
||||||
return cryptoService.encrypt(login.uri);
|
return cryptoService.encrypt(login.uri, orgKey);
|
||||||
}).then(function (cs) {
|
}).then(function (cs) {
|
||||||
model.uri = cs;
|
model.uri = cs;
|
||||||
return cryptoService.encrypt(login.username);
|
return cryptoService.encrypt(login.username, orgKey);
|
||||||
}).then(function (cs) {
|
}).then(function (cs) {
|
||||||
model.username = cs;
|
model.username = cs;
|
||||||
return cryptoService.encrypt(login.password);
|
return cryptoService.encrypt(login.password, orgKey);
|
||||||
}).then(function (cs) {
|
}).then(function (cs) {
|
||||||
model.password = cs;
|
model.password = cs;
|
||||||
return cryptoService.encrypt(login.notes);
|
return cryptoService.encrypt(login.notes, orgKey);
|
||||||
}).then(function (cs) {
|
}).then(function (cs) {
|
||||||
model.notes = cs;
|
model.notes = cs;
|
||||||
return model;
|
return model;
|
||||||
|
|||||||
Reference in New Issue
Block a user