From b26febc32a5728e4cf4ff296b951f426a945bf51 Mon Sep 17 00:00:00 2001 From: Pedro Igor Date: Wed, 2 Oct 2024 11:26:48 -0300 Subject: [PATCH] Hide brokers on login page by default when linking them to organizations Closes #33415 Signed-off-by: Pedro Igor --- js/apps/admin-ui/src/organizations/IdentityProviderSelect.tsx | 2 -- .../admin-ui/src/organizations/LinkIdentityProviderModal.tsx | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/js/apps/admin-ui/src/organizations/IdentityProviderSelect.tsx b/js/apps/admin-ui/src/organizations/IdentityProviderSelect.tsx index 43b41f4c39..0f0320d069 100644 --- a/js/apps/admin-ui/src/organizations/IdentityProviderSelect.tsx +++ b/js/apps/admin-ui/src/organizations/IdentityProviderSelect.tsx @@ -48,7 +48,6 @@ export const IdentityProviderSelect = ({ const { control, getValues, - setValue, formState: { errors }, } = useFormContext(); const values: string[] | undefined = getValues(name!); @@ -201,7 +200,6 @@ export const IdentityProviderSelect = ({ selected={field.value} onSelect={(_, v) => { const idp = v as IdentityProviderRepresentation; - setValue("hideOnLogin", idp.hideOnLogin); const option = idp.alias!; if (variant !== "typeaheadMulti") { const removed = field.value.includes(option); diff --git a/js/apps/admin-ui/src/organizations/LinkIdentityProviderModal.tsx b/js/apps/admin-ui/src/organizations/LinkIdentityProviderModal.tsx index b97f9252ef..287480ffd3 100644 --- a/js/apps/admin-ui/src/organizations/LinkIdentityProviderModal.tsx +++ b/js/apps/admin-ui/src/organizations/LinkIdentityProviderModal.tsx @@ -148,6 +148,7 @@ export const LinkIdentityProviderModal = ({ name="hideOnLogin" label={t("hideOnLoginPage")} labelIcon={t("hideOnLoginPageHelp")} + defaultValue={true} />