org key fixes
This commit is contained in:
parent
429b2b8a21
commit
14e290c489
|
@ -7,7 +7,7 @@ angular
|
||||||
|
|
||||||
if ($state.includes('backend.org')) {
|
if ($state.includes('backend.org')) {
|
||||||
var userProfile = authService.getUserProfile();
|
var userProfile = authService.getUserProfile();
|
||||||
if (!userProfile.organizations.length) {
|
if (!userProfile.organizations || !userProfile.organizations.length) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -115,13 +115,20 @@ angular
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($sessionStorage.orgKeys) {
|
if ($sessionStorage.orgKeys) {
|
||||||
_orgKeys = {};
|
var orgKeys = {},
|
||||||
|
setKey = false;
|
||||||
|
|
||||||
for (var orgId in $sessionStorage.orgKeys) {
|
for (var orgId in $sessionStorage.orgKeys) {
|
||||||
if ($sessionStorage.orgKeys.hasOwnProperty(orgId)) {
|
if ($sessionStorage.orgKeys.hasOwnProperty(orgId)) {
|
||||||
var orgKeyBytes = forge.util.decode64($sessionStorage.orgKeys[orgId]);
|
var orgKeyBytes = forge.util.decode64($sessionStorage.orgKeys[orgId]);
|
||||||
_orgKeys[orgId] = orgKeyBytes;
|
orgKeys[orgId] = orgKeyBytes;
|
||||||
|
setKey = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (setKey) {
|
||||||
|
_orgKeys = orgKeys;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return _orgKeys;
|
return _orgKeys;
|
||||||
|
|
Loading…
Reference in New Issue