Align new admin console with the 'KERBEROS' feature (#4249)
This commit is contained in:
parent
441ba1e8b0
commit
3cc2517ae4
2 changed files with 8 additions and 0 deletions
|
@ -14,6 +14,7 @@ import { LdapSettingsSearching } from "./ldap/LdapSettingsSearching";
|
|||
import { LdapSettingsSynchronization } from "./ldap/LdapSettingsSynchronization";
|
||||
import { toUserFederation } from "./routes/UserFederation";
|
||||
import { SettingsCache } from "./shared/SettingsCache";
|
||||
import { useServerInfo } from "../context/server-info/ServerInfoProvider";
|
||||
|
||||
export type LdapComponentRepresentation = ComponentRepresentation & {
|
||||
config?: {
|
||||
|
@ -35,6 +36,8 @@ export const UserFederationLdapForm = ({
|
|||
const form = useFormContext<LdapComponentRepresentation>();
|
||||
const navigate = useNavigate();
|
||||
const { realm } = useRealm();
|
||||
const kerberosDisabled =
|
||||
useServerInfo().profileInfo?.disabledFeatures?.includes("KERBEROS");
|
||||
|
||||
return (
|
||||
<>
|
||||
|
@ -59,6 +62,7 @@ export const UserFederationLdapForm = ({
|
|||
{
|
||||
title: t("kerberosIntegration"),
|
||||
panel: <LdapSettingsKerberosIntegration form={form} />,
|
||||
isHidden: kerberosDisabled,
|
||||
},
|
||||
{ title: t("cacheSettings"), panel: <SettingsCache form={form} /> },
|
||||
{
|
||||
|
|
|
@ -16,10 +16,13 @@ import { useTranslation } from "react-i18next";
|
|||
import type ComponentRepresentation from "@keycloak/keycloak-admin-client/lib/defs/componentRepresentation";
|
||||
|
||||
import { useForm } from "react-hook-form";
|
||||
import { useServerInfo } from "../context/server-info/ServerInfoProvider";
|
||||
|
||||
export const UserFederationLdapWizard = () => {
|
||||
const form = useForm<ComponentRepresentation>();
|
||||
const { t } = useTranslation("user-federation");
|
||||
const kerberosDisabled =
|
||||
useServerInfo().profileInfo?.disabledFeatures?.includes("KERBEROS");
|
||||
|
||||
const steps = [
|
||||
{
|
||||
|
@ -76,6 +79,7 @@ export const UserFederationLdapWizard = () => {
|
|||
showSectionDescription
|
||||
/>
|
||||
),
|
||||
isDisabled: kerberosDisabled,
|
||||
},
|
||||
{
|
||||
name: t("cacheSettings"),
|
||||
|
|
Loading…
Reference in a new issue