mirror of
https://github.com/keycloak/keycloak.git
synced 2025-12-16 20:15:46 -06:00
fixes: #32205
(cherry picked from commit 760b1d2a4c)
Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
This commit is contained in:
@@ -3,6 +3,13 @@ import {
|
|||||||
UnmanagedAttributePolicy,
|
UnmanagedAttributePolicy,
|
||||||
UserProfileConfig,
|
UserProfileConfig,
|
||||||
} from "@keycloak/keycloak-admin-client/lib/defs/userProfileMetadata";
|
} from "@keycloak/keycloak-admin-client/lib/defs/userProfileMetadata";
|
||||||
|
import {
|
||||||
|
FormErrorText,
|
||||||
|
HelpItem,
|
||||||
|
SelectControl,
|
||||||
|
TextControl,
|
||||||
|
useEnvironment,
|
||||||
|
} from "@keycloak/keycloak-ui-shared";
|
||||||
import {
|
import {
|
||||||
ActionGroup,
|
ActionGroup,
|
||||||
Button,
|
Button,
|
||||||
@@ -15,28 +22,21 @@ import {
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { Controller, FormProvider, useForm } from "react-hook-form";
|
import { Controller, FormProvider, useForm } from "react-hook-form";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import {
|
|
||||||
FormErrorText,
|
|
||||||
HelpItem,
|
|
||||||
SelectControl,
|
|
||||||
TextControl,
|
|
||||||
} from "@keycloak/keycloak-ui-shared";
|
|
||||||
import { useAdminClient } from "../admin-client";
|
import { useAdminClient } from "../admin-client";
|
||||||
import { DefaultSwitchControl } from "../components/SwitchControl";
|
import { DefaultSwitchControl } from "../components/SwitchControl";
|
||||||
import { FormattedLink } from "../components/external-link/FormattedLink";
|
import { FormattedLink } from "../components/external-link/FormattedLink";
|
||||||
import { FormAccess } from "../components/form/FormAccess";
|
import { FormAccess } from "../components/form/FormAccess";
|
||||||
import { KeyValueInput } from "../components/key-value-form/KeyValueInput";
|
import { KeyValueInput } from "../components/key-value-form/KeyValueInput";
|
||||||
import { KeycloakSpinner } from "../components/keycloak-spinner/KeycloakSpinner";
|
|
||||||
import { useRealm } from "../context/realm-context/RealmContext";
|
import { useRealm } from "../context/realm-context/RealmContext";
|
||||||
import {
|
import {
|
||||||
addTrailingSlash,
|
addTrailingSlash,
|
||||||
convertAttributeNameToForm,
|
convertAttributeNameToForm,
|
||||||
convertToFormValues,
|
convertToFormValues,
|
||||||
} from "../util";
|
} from "../util";
|
||||||
import { useFetch } from "../utils/useFetch";
|
|
||||||
import { UIRealmRepresentation } from "./RealmSettingsTabs";
|
|
||||||
|
|
||||||
import useIsFeatureEnabled, { Feature } from "../utils/useIsFeatureEnabled";
|
import useIsFeatureEnabled, { Feature } from "../utils/useIsFeatureEnabled";
|
||||||
|
import { UIRealmRepresentation } from "./RealmSettingsTabs";
|
||||||
|
import { useFetch } from "../utils/useFetch";
|
||||||
|
import { KeycloakSpinner } from "../components/keycloak-spinner/KeycloakSpinner";
|
||||||
|
|
||||||
type RealmSettingsGeneralTabProps = {
|
type RealmSettingsGeneralTabProps = {
|
||||||
realm: UIRealmRepresentation;
|
realm: UIRealmRepresentation;
|
||||||
@@ -96,7 +96,9 @@ function RealmSettingsGeneralTabForm({
|
|||||||
save,
|
save,
|
||||||
userProfileConfig,
|
userProfileConfig,
|
||||||
}: RealmSettingsGeneralTabFormProps) {
|
}: RealmSettingsGeneralTabFormProps) {
|
||||||
const { adminClient } = useAdminClient();
|
const {
|
||||||
|
environment: { serverBaseUrl },
|
||||||
|
} = useEnvironment();
|
||||||
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { realm: realmName } = useRealm();
|
const { realm: realmName } = useRealm();
|
||||||
@@ -251,7 +253,7 @@ function RealmSettingsGeneralTabForm({
|
|||||||
<StackItem>
|
<StackItem>
|
||||||
<FormattedLink
|
<FormattedLink
|
||||||
href={`${addTrailingSlash(
|
href={`${addTrailingSlash(
|
||||||
adminClient.baseUrl,
|
serverBaseUrl,
|
||||||
)}realms/${realmName}/.well-known/openid-configuration`}
|
)}realms/${realmName}/.well-known/openid-configuration`}
|
||||||
title={t("openIDEndpointConfiguration")}
|
title={t("openIDEndpointConfiguration")}
|
||||||
/>
|
/>
|
||||||
@@ -259,7 +261,7 @@ function RealmSettingsGeneralTabForm({
|
|||||||
<StackItem>
|
<StackItem>
|
||||||
<FormattedLink
|
<FormattedLink
|
||||||
href={`${addTrailingSlash(
|
href={`${addTrailingSlash(
|
||||||
adminClient.baseUrl,
|
serverBaseUrl,
|
||||||
)}realms/${realmName}/protocol/saml/descriptor`}
|
)}realms/${realmName}/protocol/saml/descriptor`}
|
||||||
title={t("samlIdentityProviderMetadata")}
|
title={t("samlIdentityProviderMetadata")}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user