1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +00:00

check status and types for org management

This commit is contained in:
Kyle Spearrin
2017-03-25 21:52:27 -04:00
parent 3c83741b13
commit 77ddc83a04
4 changed files with 21 additions and 10 deletions

View File

@@ -53,7 +53,7 @@ angular
}
};
_service.addOrgKey = function (orgKeyCt, privateKey) {
_service.addOrgKey = function (orgId, orgKey, privateKey) {
_orgKeys = _service.getOrgKeys();
if (!_orgKeys) {
_orgKeys = {};
@@ -65,9 +65,9 @@ angular
}
try {
var orgKey = _service.rsaDecrypt(orgKeyCt.key, privateKey);
_orgKeys[orgKeyCt.id] = orgKey;
orgKeysb64[orgKeyCt.id] = forge.util.encode64(orgKey);
var orgKey = _service.rsaDecrypt(orgKey, privateKey);
_orgKeys[orgId] = orgKey;
orgKeysb64[orgId] = forge.util.encode64(orgKey);
}
catch (e) {
_orgKeys = null;