mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
Fixed invalid props on Custom EST certs edits (#36147)
**Related issue:** Resolves #35729 - Fixed url prop mapping rule on Custom EST certs form. - When editing the url field, include credentials to PATH end-point. # Checklist for submitter If some of the following don't apply, delete the relevant line. - [X] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files) for more information. ## Testing - [X] QA'd all new/changed functionality manually
This commit is contained in:
parent
7d224515d5
commit
1078c277ab
2 changed files with 14 additions and 3 deletions
1
changes/35729-custom-est-certificate-edit-bug
Normal file
1
changes/35729-custom-est-certificate-edit-bug
Normal file
|
|
@ -0,0 +1 @@
|
|||
- Fixed bug that prevented users from editing custom EST certificates URLs.
|
||||
|
|
@ -190,11 +190,11 @@ export const generateEditCertAuthorityData = (
|
|||
case "custom_est_proxy": {
|
||||
const {
|
||||
name: customESTName,
|
||||
scepURL: customESTUrl,
|
||||
url: customESTUrl,
|
||||
username: customESTUsername,
|
||||
password: customESTPassword,
|
||||
} = formData as ISmallstepFormData;
|
||||
return {
|
||||
} = formData as ICustomESTFormData;
|
||||
const diff = {
|
||||
custom_est_proxy: deepDifference(
|
||||
{
|
||||
name: customESTName,
|
||||
|
|
@ -205,6 +205,16 @@ export const generateEditCertAuthorityData = (
|
|||
certAuthWithoutType
|
||||
),
|
||||
};
|
||||
// Make sure credentials are included if we are modifying the url
|
||||
if (diff.custom_est_proxy.url) {
|
||||
if (!diff.custom_est_proxy.username) {
|
||||
diff.custom_est_proxy.username = customESTUsername;
|
||||
}
|
||||
if (!diff.custom_est_proxy.password) {
|
||||
diff.custom_est_proxy.password = customESTPassword;
|
||||
}
|
||||
}
|
||||
return diff;
|
||||
}
|
||||
default:
|
||||
throw new Error(
|
||||
|
|
|
|||
Loading…
Reference in a new issue