Fixed Microsoft NDES CA not being selectable (#41490)

<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #38585

# Checklist for submitter

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.

## Testing
- [x] QA'd all new/changed functionality manually


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Fixed Microsoft NDES CA selection to work immediately after deleting
an existing NDES CA without requiring a page refresh.
* Added validation preventing multiple NDES CAs from being added, with a
tooltip message explaining the limitation.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Victor Lyuboslavsky
2026-03-11 19:15:16 -05:00
committed by GitHub
parent 6527c15e56
commit 373effbb9e
2 changed files with 10 additions and 14 deletions
+1
View File
@@ -0,0 +1 @@
* Fixed Microsoft NDES CA not being selectable after deleting an existing NDES CA without a page refresh.
@@ -47,21 +47,16 @@ const DEFAULT_CERT_AUTHORITY_OPTIONS: IDropdownOption[] = [
* if one already exists
*/
export const generateDropdownOptions = (hasNDESCert: boolean) => {
if (!hasNDESCert) {
return DEFAULT_CERT_AUTHORITY_OPTIONS;
}
// We only allow one NDES configuration, if ones exists disable the option and
// add a tooltip.
const ndesOption = DEFAULT_CERT_AUTHORITY_OPTIONS.find((option) => {
return option.value === "ndes_scep_proxy";
return DEFAULT_CERT_AUTHORITY_OPTIONS.map((option) => {
if (option.value === "ndes_scep_proxy" && hasNDESCert) {
return {
...option,
disabled: true,
tooltipContent: "Only one NDES can be added.",
};
}
return option;
});
if (ndesOption) {
ndesOption.disabled = true;
ndesOption.tooltipContent = "Only one NDES can be added.";
}
return DEFAULT_CERT_AUTHORITY_OPTIONS;
};
/**