From 1521024abfd861c89fdbbcf3173aaa9ad04e5cdb Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Mon, 26 Apr 2021 09:40:59 +0200 Subject: [PATCH] fixed the wrong comment --- src/clients/add/CapabilityConfig.tsx | 14 ++++++++------ src/clients/add/NewClientForm.tsx | 1 - 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/clients/add/CapabilityConfig.tsx b/src/clients/add/CapabilityConfig.tsx index 6bdb510cc5..8f2b58f339 100644 --- a/src/clients/add/CapabilityConfig.tsx +++ b/src/clients/add/CapabilityConfig.tsx @@ -26,7 +26,7 @@ export const CapabilityConfig = ({ const { control, watch, setValue } = useFormContext(); const protocol = type || watch("protocol"); const clientAuthentication = watch("publicClient"); - const clientAuthorization = watch("authorizationServicesEnabled"); + const authorization = watch("authorizationServicesEnabled"); return ( @@ -47,7 +47,7 @@ export const CapabilityConfig = ({ > ( { onChange(value); if (value) { @@ -188,11 +188,13 @@ export const CapabilityConfig = ({ id="kc-flow-service-account" name="serviceAccountsEnabled" isChecked={ - value || - (clientAuthentication && clientAuthorization) + value || (clientAuthentication && authorization) } onChange={onChange} - isDisabled={clientAuthorization} + isDisabled={ + (clientAuthentication && !authorization) || + (!clientAuthentication && authorization) + } />