disable vendor if provider exists (#1447)
This commit is contained in:
parent
9c48bb4d90
commit
8e5ce6aa34
2 changed files with 4 additions and 1 deletions
|
@ -299,7 +299,7 @@ export default function UserFederationLdapSettings() {
|
||||||
t("advancedSettings"),
|
t("advancedSettings"),
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<LdapSettingsGeneral form={form} />
|
<LdapSettingsGeneral form={form} vendorEdit={!!id} />
|
||||||
<LdapSettingsConnection form={form} edit={!!id} />
|
<LdapSettingsConnection form={form} edit={!!id} />
|
||||||
<LdapSettingsSearching form={form} />
|
<LdapSettingsSearching form={form} />
|
||||||
<LdapSettingsSynchronization form={form} />
|
<LdapSettingsSynchronization form={form} />
|
||||||
|
|
|
@ -19,12 +19,14 @@ export type LdapSettingsGeneralProps = {
|
||||||
form: UseFormMethods;
|
form: UseFormMethods;
|
||||||
showSectionHeading?: boolean;
|
showSectionHeading?: boolean;
|
||||||
showSectionDescription?: boolean;
|
showSectionDescription?: boolean;
|
||||||
|
vendorEdit?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const LdapSettingsGeneral = ({
|
export const LdapSettingsGeneral = ({
|
||||||
form,
|
form,
|
||||||
showSectionHeading = false,
|
showSectionHeading = false,
|
||||||
showSectionDescription = false,
|
showSectionDescription = false,
|
||||||
|
vendorEdit = false,
|
||||||
}: LdapSettingsGeneralProps) => {
|
}: LdapSettingsGeneralProps) => {
|
||||||
const { t } = useTranslation("user-federation");
|
const { t } = useTranslation("user-federation");
|
||||||
const helpText = useTranslation("user-federation-help").t;
|
const helpText = useTranslation("user-federation-help").t;
|
||||||
|
@ -174,6 +176,7 @@ export const LdapSettingsGeneral = ({
|
||||||
control={form.control}
|
control={form.control}
|
||||||
render={({ onChange, value }) => (
|
render={({ onChange, value }) => (
|
||||||
<Select
|
<Select
|
||||||
|
isDisabled={!!vendorEdit}
|
||||||
toggleId="kc-vendor"
|
toggleId="kc-vendor"
|
||||||
required
|
required
|
||||||
onToggle={() => setIsVendorDropdownOpen(!isVendorDropdownOpen)}
|
onToggle={() => setIsVendorDropdownOpen(!isVendorDropdownOpen)}
|
||||||
|
|
Loading…
Reference in a new issue