mirror of
https://github.com/bitwarden/web
synced 2025-12-16 16:23:31 +00:00
add new org to profile
This commit is contained in:
@@ -80,6 +80,26 @@ angular
|
||||
apiService.accounts.getProfile({}, loadProfile);
|
||||
};
|
||||
|
||||
_service.addProfileOrganization = function (org) {
|
||||
var profile = _service.getUserProfile();
|
||||
if (profile) {
|
||||
if (!profile.Organizations) {
|
||||
profile.Organizations = [];
|
||||
}
|
||||
|
||||
var org = {
|
||||
id: org.Id,
|
||||
name: org.Name,
|
||||
key: org.Key,
|
||||
status: org.Status
|
||||
};
|
||||
profile.organizations.push(org);
|
||||
|
||||
_userProfile = profile;
|
||||
cryptoService.addOrgKey(org);
|
||||
}
|
||||
};
|
||||
|
||||
function loadProfile(profile) {
|
||||
_userProfile.extended = {
|
||||
name: profile.Name,
|
||||
|
||||
Reference in New Issue
Block a user