From ef4a246aa92f1637e454244783c64c3bc4e7d9b2 Mon Sep 17 00:00:00 2001 From: Hynek Mlnarik Date: Wed, 15 May 2024 14:32:54 +0200 Subject: [PATCH] Keep correct format of config fields Fixes: #29314 Signed-off-by: Hynek Mlnarik --- .../src/identity-providers/add/DetailSettings.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/js/apps/admin-ui/src/identity-providers/add/DetailSettings.tsx b/js/apps/admin-ui/src/identity-providers/add/DetailSettings.tsx index 67c728fdf3..560acb5150 100644 --- a/js/apps/admin-ui/src/identity-providers/add/DetailSettings.tsx +++ b/js/apps/admin-ui/src/identity-providers/add/DetailSettings.tsx @@ -328,10 +328,12 @@ export default function DetailSettings() { const save = async (savedProvider?: IdentityProviderRepresentation) => { const p = savedProvider || getValues(); + const origAuthnContextClassRefs = p.config?.authnContextClassRefs; if (p.config?.authnContextClassRefs) p.config.authnContextClassRefs = JSON.stringify( p.config.authnContextClassRefs, ); + const origAuthnContextDeclRefs = p.config?.authnContextDeclRefs; if (p.config?.authnContextDeclRefs) p.config.authnContextDeclRefs = JSON.stringify( p.config.authnContextDeclRefs, @@ -347,6 +349,12 @@ export default function DetailSettings() { providerId, }, ); + if (origAuthnContextClassRefs) { + p.config!.authnContextClassRefs = origAuthnContextClassRefs; + } + if (origAuthnContextDeclRefs) { + p.config!.authnContextDeclRefs = origAuthnContextDeclRefs; + } reset(p); addAlert(t("updateSuccessIdentityProvider"), AlertVariant.success); } catch (error) {