mirror of
https://github.com/bitwarden/web
synced 2026-01-06 02:24:02 +00:00
delete organization
This commit is contained in:
@@ -140,6 +140,19 @@ angular
|
||||
});
|
||||
};
|
||||
|
||||
_service.removeProfileOrganization = function (orgId) {
|
||||
return _service.getUserProfile().then(function (profile) {
|
||||
if (profile) {
|
||||
if (profile.organizations && profile.organizations.hasOwnProperty(orgId)) {
|
||||
delete profile.organizations[orgId];
|
||||
_userProfile = profile;
|
||||
}
|
||||
|
||||
cryptoService.clearOrgKey(orgId);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
_service.updateProfileOrganization = function (org) {
|
||||
return _service.getUserProfile().then(function (profile) {
|
||||
if (profile) {
|
||||
|
||||
@@ -193,6 +193,16 @@ angular
|
||||
delete $sessionStorage.orgKeys;
|
||||
};
|
||||
|
||||
_service.clearOrgKey = function (orgId) {
|
||||
if (_orgKeys.hasOwnProperty(orgId)) {
|
||||
delete _orgKeys[orgId];
|
||||
}
|
||||
|
||||
if ($sessionStorage.orgKeys.hasOwnProperty(orgId)) {
|
||||
delete $sessionStorage.orgKeys[orgId];
|
||||
}
|
||||
};
|
||||
|
||||
_service.clearKeys = function () {
|
||||
_service.clearKey();
|
||||
_service.clearKeyPair();
|
||||
|
||||
Reference in New Issue
Block a user