parent
4d789f84e3
commit
4fc3865bbd
3 changed files with 20 additions and 2 deletions
|
@ -40,9 +40,10 @@ export const UserFederationSection = () => {
|
|||
const history = useHistory();
|
||||
|
||||
useFetch(
|
||||
() => {
|
||||
async () => {
|
||||
const realmModel = await adminClient.realms.findOne({ realm });
|
||||
const testParams: { [name: string]: string | number } = {
|
||||
parentId: realm,
|
||||
parentId: realmModel.id!,
|
||||
type: "org.keycloak.storage.UserStorageProvider",
|
||||
};
|
||||
return adminClient.components.find(testParams);
|
||||
|
|
|
@ -16,6 +16,7 @@ import { useRealm } from "../../context/realm-context/RealmContext";
|
|||
import { HelpItem } from "../../components/help-enabler/HelpItem";
|
||||
import _ from "lodash";
|
||||
import { WizardSectionHeader } from "../../components/wizard-section-header/WizardSectionHeader";
|
||||
import { useAdminClient, useFetch } from "../../context/auth/AdminClient";
|
||||
|
||||
export type KerberosSettingsRequiredProps = {
|
||||
form: UseFormMethods;
|
||||
|
@ -30,6 +31,8 @@ export const KerberosSettingsRequired = ({
|
|||
}: KerberosSettingsRequiredProps) => {
|
||||
const { t } = useTranslation("user-federation");
|
||||
const helpText = useTranslation("user-federation-help").t;
|
||||
|
||||
const adminClient = useAdminClient();
|
||||
const { realm } = useRealm();
|
||||
|
||||
const [isEditModeDropdownOpen, setIsEditModeDropdownOpen] = useState(false);
|
||||
|
@ -39,6 +42,12 @@ export const KerberosSettingsRequired = ({
|
|||
name: "config.allowPasswordAuthentication",
|
||||
});
|
||||
|
||||
useFetch(
|
||||
() => adminClient.realms.findOne({ realm }),
|
||||
(result) => form.setValue("parentId", result.id),
|
||||
[]
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
{showSectionHeading && (
|
||||
|
|
|
@ -13,6 +13,7 @@ import { FormAccess } from "../../components/form-access/FormAccess";
|
|||
import { useRealm } from "../../context/realm-context/RealmContext";
|
||||
|
||||
import { WizardSectionHeader } from "../../components/wizard-section-header/WizardSectionHeader";
|
||||
import { useAdminClient, useFetch } from "../../context/auth/AdminClient";
|
||||
|
||||
export type LdapSettingsGeneralProps = {
|
||||
form: UseFormMethods;
|
||||
|
@ -27,8 +28,15 @@ export const LdapSettingsGeneral = ({
|
|||
}: LdapSettingsGeneralProps) => {
|
||||
const { t } = useTranslation("user-federation");
|
||||
const helpText = useTranslation("user-federation-help").t;
|
||||
|
||||
const adminClient = useAdminClient();
|
||||
const { realm } = useRealm();
|
||||
|
||||
useFetch(
|
||||
() => adminClient.realms.findOne({ realm }),
|
||||
(result) => form.setValue("parentId", result.id),
|
||||
[]
|
||||
);
|
||||
const [isVendorDropdownOpen, setIsVendorDropdownOpen] = useState(false);
|
||||
|
||||
const setVendorDefaultValues = () => {
|
||||
|
|
Loading…
Reference in a new issue