mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
[PM-25913] Fix owners unable to rename provider-managed organization (#17482)
Update to match new API: send null properties for organization properties that are unchanged
This commit is contained in:
@@ -168,18 +168,11 @@ export class AccountComponent implements OnInit, OnDestroy {
|
||||
return;
|
||||
}
|
||||
|
||||
const request = new OrganizationUpdateRequest();
|
||||
|
||||
/*
|
||||
* When you disable a FormControl, it is removed from formGroup.values, so we have to use
|
||||
* the original value.
|
||||
* */
|
||||
request.name = this.formGroup.get("orgName").disabled
|
||||
? this.org.name
|
||||
: this.formGroup.value.orgName;
|
||||
request.billingEmail = this.formGroup.get("billingEmail").disabled
|
||||
? this.org.billingEmail
|
||||
: this.formGroup.value.billingEmail;
|
||||
// The server ignores any undefined values, so it's ok to reference disabled form fields here
|
||||
const request: OrganizationUpdateRequest = {
|
||||
name: this.formGroup.value.orgName,
|
||||
billingEmail: this.formGroup.value.billingEmail,
|
||||
};
|
||||
|
||||
// Backfill pub/priv key if necessary
|
||||
if (!this.org.hasPublicAndPrivateKeys) {
|
||||
|
||||
Reference in New Issue
Block a user