2023-01-26 09:31:07 +00:00
|
|
|
import type RealmRepresentation from "@keycloak/keycloak-admin-client/lib/defs/realmRepresentation";
|
2021-09-02 20:14:43 +00:00
|
|
|
import {
|
|
|
|
AlertVariant,
|
|
|
|
ButtonVariant,
|
|
|
|
DropdownItem,
|
|
|
|
DropdownSeparator,
|
|
|
|
PageSection,
|
|
|
|
Tab,
|
|
|
|
TabTitleText,
|
2022-07-08 08:48:11 +00:00
|
|
|
Tooltip,
|
2021-09-02 20:14:43 +00:00
|
|
|
} from "@patternfly/react-core";
|
2023-01-26 09:31:07 +00:00
|
|
|
import { useEffect, useState } from "react";
|
|
|
|
import { Controller, useForm } from "react-hook-form";
|
|
|
|
import { useTranslation } from "react-i18next";
|
|
|
|
import { useNavigate } from "react-router-dom";
|
2021-09-02 20:14:43 +00:00
|
|
|
|
2023-05-03 13:51:02 +00:00
|
|
|
import { adminClient } from "../admin-client";
|
2023-01-26 09:31:07 +00:00
|
|
|
import { useAlerts } from "../components/alert/Alerts";
|
2021-09-02 20:14:43 +00:00
|
|
|
import { useConfirmDialog } from "../components/confirm-dialog/ConfirmDialog";
|
2023-01-26 09:31:07 +00:00
|
|
|
import type { KeyValueType } from "../components/key-value-form/key-value-convert";
|
2022-01-14 10:05:50 +00:00
|
|
|
import {
|
|
|
|
RoutableTabs,
|
2023-01-04 12:30:54 +00:00
|
|
|
useRoutableTab,
|
2022-01-14 10:05:50 +00:00
|
|
|
} from "../components/routable-tabs/RoutableTabs";
|
2021-09-02 20:14:43 +00:00
|
|
|
import { ViewHeader } from "../components/view-header/ViewHeader";
|
2023-04-18 16:50:46 +00:00
|
|
|
import { useRealms } from "../context/RealmsContext";
|
2023-01-26 09:31:07 +00:00
|
|
|
import { useRealm } from "../context/realm-context/RealmContext";
|
|
|
|
import { toDashboard } from "../dashboard/routes/Dashboard";
|
|
|
|
import environment from "../environment";
|
|
|
|
import helpUrls from "../help-urls";
|
2022-10-03 10:46:56 +00:00
|
|
|
import { convertFormValuesToObject, convertToFormValues } from "../util";
|
2023-01-26 09:31:07 +00:00
|
|
|
import useIsFeatureEnabled, { Feature } from "../utils/useIsFeatureEnabled";
|
2021-09-02 20:14:43 +00:00
|
|
|
import { RealmSettingsEmailTab } from "./EmailTab";
|
|
|
|
import { RealmSettingsGeneralTab } from "./GeneralTab";
|
2023-01-26 09:31:07 +00:00
|
|
|
import { LocalizationTab } from "./LocalizationTab";
|
2021-09-02 20:14:43 +00:00
|
|
|
import { RealmSettingsLoginTab } from "./LoginTab";
|
2023-01-26 09:31:07 +00:00
|
|
|
import { PartialExportDialog } from "./PartialExport";
|
|
|
|
import { PartialImportDialog } from "./PartialImport";
|
|
|
|
import { PoliciesTab } from "./PoliciesTab";
|
|
|
|
import ProfilesTab from "./ProfilesTab";
|
2023-04-11 11:28:24 +00:00
|
|
|
import { RealmSettingsSessionsTab } from "./SessionsTab";
|
|
|
|
import { RealmSettingsThemesTab } from "./ThemesTab";
|
|
|
|
import { RealmSettingsTokensTab } from "./TokensTab";
|
|
|
|
import { UserRegistration } from "./UserRegistration";
|
2023-04-18 16:50:46 +00:00
|
|
|
import { EventsTab } from "./event-config/EventsTab";
|
|
|
|
import { KeysTab } from "./keys/KeysTab";
|
|
|
|
import { ClientPoliciesTab, toClientPolicies } from "./routes/ClientPolicies";
|
|
|
|
import { RealmSettingsTab, toRealmSettings } from "./routes/RealmSettings";
|
|
|
|
import { SecurityDefenses } from "./security-defences/SecurityDefenses";
|
|
|
|
import { UserProfileTab } from "./user-profile/UserProfileTab";
|
2021-09-02 20:14:43 +00:00
|
|
|
|
|
|
|
type RealmSettingsHeaderProps = {
|
|
|
|
onChange: (value: boolean) => void;
|
|
|
|
value: boolean;
|
|
|
|
save: () => void;
|
|
|
|
realmName: string;
|
2021-09-27 17:15:36 +00:00
|
|
|
refresh: () => void;
|
2021-09-02 20:14:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const RealmSettingsHeader = ({
|
|
|
|
save,
|
|
|
|
onChange,
|
|
|
|
value,
|
|
|
|
realmName,
|
2021-09-27 17:15:36 +00:00
|
|
|
refresh,
|
2021-09-02 20:14:43 +00:00
|
|
|
}: RealmSettingsHeaderProps) => {
|
2023-09-08 13:17:17 +00:00
|
|
|
const { t } = useTranslation();
|
2021-11-11 16:04:04 +00:00
|
|
|
const { refresh: refreshRealms } = useRealms();
|
2021-09-02 20:14:43 +00:00
|
|
|
const { addAlert, addError } = useAlerts();
|
2022-08-16 13:09:14 +00:00
|
|
|
const navigate = useNavigate();
|
2021-09-02 20:14:43 +00:00
|
|
|
const [partialImportOpen, setPartialImportOpen] = useState(false);
|
2021-10-29 02:50:25 +00:00
|
|
|
const [partialExportOpen, setPartialExportOpen] = useState(false);
|
2021-09-02 20:14:43 +00:00
|
|
|
|
|
|
|
const [toggleDisableDialog, DisableConfirm] = useConfirmDialog({
|
2023-09-25 07:06:56 +00:00
|
|
|
titleKey: "disableConfirmTitle",
|
2023-09-08 13:17:17 +00:00
|
|
|
messageKey: "disableConfirmRealm",
|
2023-09-14 09:01:15 +00:00
|
|
|
continueButtonLabel: "disable",
|
2021-09-02 20:14:43 +00:00
|
|
|
onConfirm: () => {
|
|
|
|
onChange(!value);
|
|
|
|
save();
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
const [toggleDeleteDialog, DeleteConfirm] = useConfirmDialog({
|
2023-09-25 07:06:56 +00:00
|
|
|
titleKey: "deleteConfirmTitle",
|
2023-09-08 13:17:17 +00:00
|
|
|
messageKey: "deleteConfirmRealmSetting",
|
2023-09-14 09:01:15 +00:00
|
|
|
continueButtonLabel: "delete",
|
2021-09-02 20:14:43 +00:00
|
|
|
continueButtonVariant: ButtonVariant.danger,
|
|
|
|
onConfirm: async () => {
|
|
|
|
try {
|
|
|
|
await adminClient.realms.del({ realm: realmName });
|
2023-09-08 13:17:17 +00:00
|
|
|
addAlert(t("deletedSuccessRealmSetting"), AlertVariant.success);
|
2021-11-11 16:04:04 +00:00
|
|
|
await refreshRealms();
|
2022-08-16 13:09:14 +00:00
|
|
|
navigate(toDashboard({ realm: environment.masterRealm }));
|
2021-09-02 20:14:43 +00:00
|
|
|
refresh();
|
|
|
|
} catch (error) {
|
2023-09-08 13:17:17 +00:00
|
|
|
addError("deleteErrorRealmSetting", error);
|
2021-09-02 20:14:43 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<DisableConfirm />
|
|
|
|
<DeleteConfirm />
|
|
|
|
<PartialImportDialog
|
|
|
|
open={partialImportOpen}
|
|
|
|
toggleDialog={() => setPartialImportOpen(!partialImportOpen)}
|
|
|
|
/>
|
2021-10-29 02:50:25 +00:00
|
|
|
<PartialExportDialog
|
|
|
|
isOpen={partialExportOpen}
|
|
|
|
onClose={() => setPartialExportOpen(false)}
|
|
|
|
/>
|
2021-09-02 20:14:43 +00:00
|
|
|
<ViewHeader
|
2022-10-03 10:46:56 +00:00
|
|
|
titleKey={realmName}
|
2023-09-25 07:06:56 +00:00
|
|
|
subKey="realmSettingsExplain"
|
2021-12-21 15:32:53 +00:00
|
|
|
helpUrl={helpUrls.realmSettingsUrl}
|
2021-09-02 20:14:43 +00:00
|
|
|
divider={false}
|
|
|
|
dropdownItems={[
|
|
|
|
<DropdownItem
|
|
|
|
key="import"
|
|
|
|
data-testid="openPartialImportModal"
|
|
|
|
onClick={() => {
|
|
|
|
setPartialImportOpen(true);
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
{t("partialImport")}
|
|
|
|
</DropdownItem>,
|
2021-10-29 02:50:25 +00:00
|
|
|
<DropdownItem
|
|
|
|
key="export"
|
|
|
|
data-testid="openPartialExportModal"
|
|
|
|
onClick={() => setPartialExportOpen(true)}
|
|
|
|
>
|
|
|
|
{t("partialExport")}
|
|
|
|
</DropdownItem>,
|
2021-09-02 20:14:43 +00:00
|
|
|
<DropdownSeparator key="separator" />,
|
|
|
|
<DropdownItem key="delete" onClick={toggleDeleteDialog}>
|
2023-09-14 09:01:15 +00:00
|
|
|
{t("delete")}
|
2021-09-02 20:14:43 +00:00
|
|
|
</DropdownItem>,
|
|
|
|
]}
|
|
|
|
isEnabled={value}
|
|
|
|
onToggle={(value) => {
|
|
|
|
if (!value) {
|
|
|
|
toggleDisableDialog();
|
|
|
|
} else {
|
|
|
|
onChange(value);
|
|
|
|
save();
|
|
|
|
}
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
type RealmSettingsTabsProps = {
|
|
|
|
realm: RealmRepresentation;
|
2021-09-27 17:15:36 +00:00
|
|
|
refresh: () => void;
|
2021-09-02 20:14:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export const RealmSettingsTabs = ({
|
|
|
|
realm,
|
2021-09-27 17:15:36 +00:00
|
|
|
refresh,
|
2021-09-02 20:14:43 +00:00
|
|
|
}: RealmSettingsTabsProps) => {
|
2023-09-08 13:17:17 +00:00
|
|
|
const { t } = useTranslation();
|
2021-09-02 20:14:43 +00:00
|
|
|
const { addAlert, addError } = useAlerts();
|
2021-11-11 16:04:04 +00:00
|
|
|
const { realm: realmName } = useRealm();
|
|
|
|
const { refresh: refreshRealms } = useRealms();
|
2022-08-16 13:09:14 +00:00
|
|
|
const navigate = useNavigate();
|
2022-01-03 15:00:03 +00:00
|
|
|
const isFeatureEnabled = useIsFeatureEnabled();
|
2021-09-02 20:14:43 +00:00
|
|
|
|
2022-06-15 12:57:39 +00:00
|
|
|
const { control, setValue, getValues } = useForm({
|
|
|
|
mode: "onChange",
|
|
|
|
});
|
2021-09-02 20:14:43 +00:00
|
|
|
const [key, setKey] = useState(0);
|
|
|
|
|
2021-09-27 17:15:36 +00:00
|
|
|
const refreshHeader = () => {
|
2022-06-15 12:57:39 +00:00
|
|
|
setKey(key + 1);
|
2021-09-02 20:14:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const setupForm = (r: RealmRepresentation = realm) => {
|
2021-12-08 15:08:42 +00:00
|
|
|
convertToFormValues(r, setValue);
|
2021-09-02 20:14:43 +00:00
|
|
|
};
|
|
|
|
|
2022-06-15 12:57:39 +00:00
|
|
|
useEffect(setupForm, []);
|
2021-09-02 20:14:43 +00:00
|
|
|
|
2022-06-15 12:57:39 +00:00
|
|
|
const save = async (r: RealmRepresentation) => {
|
|
|
|
r = convertFormValuesToObject(r);
|
|
|
|
if (
|
|
|
|
r.attributes?.["acr.loa.map"] &&
|
|
|
|
typeof r.attributes["acr.loa.map"] !== "string"
|
|
|
|
) {
|
2022-09-06 16:52:57 +00:00
|
|
|
r.attributes["acr.loa.map"] = JSON.stringify(
|
2022-06-15 12:57:39 +00:00
|
|
|
Object.fromEntries(
|
|
|
|
(r.attributes["acr.loa.map"] as KeyValueType[])
|
|
|
|
.filter(({ key }) => key !== "")
|
2023-07-11 14:03:21 +00:00
|
|
|
.map(({ key, value }) => [key, value]),
|
|
|
|
),
|
2022-06-15 12:57:39 +00:00
|
|
|
);
|
|
|
|
}
|
2021-09-27 17:15:36 +00:00
|
|
|
|
2022-06-15 12:57:39 +00:00
|
|
|
try {
|
2023-07-07 09:48:20 +00:00
|
|
|
const savedRealm: RealmRepresentation = {
|
|
|
|
...realm,
|
|
|
|
...r,
|
|
|
|
id: r.realm,
|
|
|
|
};
|
|
|
|
|
|
|
|
// For the default value, null is expected instead of an empty string.
|
|
|
|
if (savedRealm.smtpServer?.port === "") {
|
|
|
|
savedRealm.smtpServer = { ...savedRealm.smtpServer, port: null };
|
|
|
|
}
|
|
|
|
await adminClient.realms.update({ realm: realmName }, savedRealm);
|
2023-09-08 13:17:17 +00:00
|
|
|
addAlert(t("realmSaveSuccess"), AlertVariant.success);
|
2021-09-02 20:14:43 +00:00
|
|
|
} catch (error) {
|
2023-09-08 13:17:17 +00:00
|
|
|
addError("realmSaveError", error);
|
2021-09-02 20:14:43 +00:00
|
|
|
}
|
|
|
|
|
2022-06-15 12:57:39 +00:00
|
|
|
const isRealmRenamed = realmName !== (r.realm || realm.realm);
|
|
|
|
if (isRealmRenamed) {
|
|
|
|
await refreshRealms();
|
2022-08-16 13:09:14 +00:00
|
|
|
navigate(toRealmSettings({ realm: r.realm!, tab: "general" }));
|
2022-06-15 12:57:39 +00:00
|
|
|
}
|
|
|
|
refresh();
|
|
|
|
};
|
2022-01-03 15:00:03 +00:00
|
|
|
|
2023-01-04 12:30:54 +00:00
|
|
|
const useTab = (tab: RealmSettingsTab) =>
|
|
|
|
useRoutableTab(toRealmSettings({ realm: realmName, tab }));
|
2022-01-31 07:19:44 +00:00
|
|
|
|
2023-01-04 12:30:54 +00:00
|
|
|
const generalTab = useTab("general");
|
|
|
|
const loginTab = useTab("login");
|
|
|
|
const emailTab = useTab("email");
|
|
|
|
const themesTab = useTab("themes");
|
|
|
|
const keysTab = useTab("keys");
|
|
|
|
const eventsTab = useTab("events");
|
|
|
|
const localizationTab = useTab("localization");
|
|
|
|
const securityDefensesTab = useTab("security-defenses");
|
|
|
|
const sessionsTab = useTab("sessions");
|
|
|
|
const tokensTab = useTab("tokens");
|
|
|
|
const clientPoliciesTab = useTab("client-policies");
|
|
|
|
const userProfileTab = useTab("user-profile");
|
|
|
|
const userRegistrationTab = useTab("user-registration");
|
|
|
|
|
|
|
|
const useClientPoliciesTab = (tab: ClientPoliciesTab) =>
|
|
|
|
useRoutableTab(
|
|
|
|
toClientPolicies({
|
2022-01-31 07:19:44 +00:00
|
|
|
realm: realmName,
|
|
|
|
tab,
|
2023-07-11 14:03:21 +00:00
|
|
|
}),
|
2023-01-04 12:30:54 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
const clientPoliciesProfilesTab = useClientPoliciesTab("profiles");
|
|
|
|
const clientPoliciesPoliciesTab = useClientPoliciesTab("policies");
|
2022-01-31 07:19:44 +00:00
|
|
|
|
2021-09-02 20:14:43 +00:00
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<Controller
|
|
|
|
name="enabled"
|
|
|
|
defaultValue={true}
|
|
|
|
control={control}
|
2023-01-26 09:31:07 +00:00
|
|
|
render={({ field }) => (
|
2021-09-02 20:14:43 +00:00
|
|
|
<RealmSettingsHeader
|
2023-01-26 09:31:07 +00:00
|
|
|
value={field.value}
|
|
|
|
onChange={field.onChange}
|
2021-09-02 20:14:43 +00:00
|
|
|
realmName={realmName}
|
2021-09-27 17:15:36 +00:00
|
|
|
refresh={refreshHeader}
|
2021-09-02 20:14:43 +00:00
|
|
|
save={() => save(getValues())}
|
|
|
|
/>
|
|
|
|
)}
|
|
|
|
/>
|
|
|
|
<PageSection variant="light" className="pf-u-p-0">
|
2022-06-15 12:57:39 +00:00
|
|
|
<RoutableTabs
|
|
|
|
isBox
|
|
|
|
mountOnEnter
|
2023-06-29 11:59:52 +00:00
|
|
|
aria-label="realm-settings-tabs"
|
2022-06-15 12:57:39 +00:00
|
|
|
defaultLocation={toRealmSettings({
|
|
|
|
realm: realmName,
|
|
|
|
tab: "general",
|
|
|
|
})}
|
|
|
|
>
|
|
|
|
<Tab
|
|
|
|
title={<TabTitleText>{t("general")}</TabTitleText>}
|
|
|
|
data-testid="rs-general-tab"
|
2023-01-04 12:30:54 +00:00
|
|
|
{...generalTab}
|
2022-01-31 07:19:44 +00:00
|
|
|
>
|
2022-06-15 12:57:39 +00:00
|
|
|
<RealmSettingsGeneralTab realm={realm} save={save} />
|
|
|
|
</Tab>
|
|
|
|
<Tab
|
|
|
|
title={<TabTitleText>{t("login")}</TabTitleText>}
|
|
|
|
data-testid="rs-login-tab"
|
2023-01-04 12:30:54 +00:00
|
|
|
{...loginTab}
|
2022-06-15 12:57:39 +00:00
|
|
|
>
|
|
|
|
<RealmSettingsLoginTab refresh={refresh} realm={realm} />
|
|
|
|
</Tab>
|
|
|
|
<Tab
|
|
|
|
title={<TabTitleText>{t("email")}</TabTitleText>}
|
|
|
|
data-testid="rs-email-tab"
|
2023-01-04 12:30:54 +00:00
|
|
|
{...emailTab}
|
2022-06-15 12:57:39 +00:00
|
|
|
>
|
2023-07-07 09:48:20 +00:00
|
|
|
<RealmSettingsEmailTab realm={realm} save={save} />
|
2022-06-15 12:57:39 +00:00
|
|
|
</Tab>
|
|
|
|
<Tab
|
|
|
|
title={<TabTitleText>{t("themes")}</TabTitleText>}
|
|
|
|
data-testid="rs-themes-tab"
|
2023-01-04 12:30:54 +00:00
|
|
|
{...themesTab}
|
2022-06-15 12:57:39 +00:00
|
|
|
>
|
|
|
|
<RealmSettingsThemesTab realm={realm} save={save} />
|
|
|
|
</Tab>
|
|
|
|
<Tab
|
2023-09-25 07:06:56 +00:00
|
|
|
title={<TabTitleText>{t("keys")}</TabTitleText>}
|
2022-06-15 12:57:39 +00:00
|
|
|
data-testid="rs-keys-tab"
|
2023-01-04 12:30:54 +00:00
|
|
|
{...keysTab}
|
2022-06-15 12:57:39 +00:00
|
|
|
>
|
|
|
|
<KeysTab />
|
|
|
|
</Tab>
|
|
|
|
<Tab
|
|
|
|
title={<TabTitleText>{t("events")}</TabTitleText>}
|
|
|
|
data-testid="rs-realm-events-tab"
|
2023-01-04 12:30:54 +00:00
|
|
|
{...eventsTab}
|
2022-06-15 12:57:39 +00:00
|
|
|
>
|
2022-09-08 18:31:24 +00:00
|
|
|
<EventsTab realm={realm} />
|
2022-06-15 12:57:39 +00:00
|
|
|
</Tab>
|
|
|
|
<Tab
|
|
|
|
title={<TabTitleText>{t("localization")}</TabTitleText>}
|
|
|
|
data-testid="rs-localization-tab"
|
2023-01-04 12:30:54 +00:00
|
|
|
{...localizationTab}
|
2022-06-15 12:57:39 +00:00
|
|
|
>
|
|
|
|
<LocalizationTab
|
|
|
|
key={key}
|
|
|
|
refresh={refresh}
|
|
|
|
save={save}
|
|
|
|
realm={realm}
|
|
|
|
/>
|
|
|
|
</Tab>
|
|
|
|
<Tab
|
|
|
|
title={<TabTitleText>{t("securityDefences")}</TabTitleText>}
|
|
|
|
data-testid="rs-security-defenses-tab"
|
2023-01-04 12:30:54 +00:00
|
|
|
{...securityDefensesTab}
|
2022-06-15 12:57:39 +00:00
|
|
|
>
|
|
|
|
<SecurityDefenses realm={realm} save={save} />
|
|
|
|
</Tab>
|
|
|
|
<Tab
|
2023-09-25 07:06:56 +00:00
|
|
|
title={<TabTitleText>{t("sessions")}</TabTitleText>}
|
2022-06-15 12:57:39 +00:00
|
|
|
data-testid="rs-sessions-tab"
|
2023-01-04 12:30:54 +00:00
|
|
|
{...sessionsTab}
|
2022-06-15 12:57:39 +00:00
|
|
|
>
|
|
|
|
<RealmSettingsSessionsTab key={key} realm={realm} save={save} />
|
|
|
|
</Tab>
|
|
|
|
<Tab
|
2023-09-25 07:06:56 +00:00
|
|
|
title={<TabTitleText>{t("tokens")}</TabTitleText>}
|
2022-06-15 12:57:39 +00:00
|
|
|
data-testid="rs-tokens-tab"
|
2023-01-04 12:30:54 +00:00
|
|
|
{...tokensTab}
|
2022-06-15 12:57:39 +00:00
|
|
|
>
|
|
|
|
<RealmSettingsTokensTab save={save} realm={realm} />
|
|
|
|
</Tab>
|
2023-04-18 16:50:46 +00:00
|
|
|
{isFeatureEnabled(Feature.ClientPolicies) && (
|
2023-04-07 11:51:37 +00:00
|
|
|
<Tab
|
2023-09-25 07:06:56 +00:00
|
|
|
title={<TabTitleText>{t("clientPolicies")}</TabTitleText>}
|
2023-04-07 11:51:37 +00:00
|
|
|
data-testid="rs-clientPolicies-tab"
|
|
|
|
{...clientPoliciesTab}
|
2021-09-09 10:45:19 +00:00
|
|
|
>
|
2023-04-07 11:51:37 +00:00
|
|
|
<RoutableTabs
|
|
|
|
mountOnEnter
|
|
|
|
defaultLocation={toClientPolicies({
|
|
|
|
realm: realmName,
|
|
|
|
tab: "profiles",
|
|
|
|
})}
|
2022-06-15 12:57:39 +00:00
|
|
|
>
|
2023-04-07 11:51:37 +00:00
|
|
|
<Tab
|
|
|
|
id="profiles"
|
|
|
|
data-testid="rs-policies-clientProfiles-tab"
|
|
|
|
aria-label={t("clientProfilesSubTab")}
|
|
|
|
title={<TabTitleText>{t("profiles")}</TabTitleText>}
|
|
|
|
tooltip={
|
2023-09-25 07:06:56 +00:00
|
|
|
<Tooltip content={t("clientPoliciesProfilesHelpText")} />
|
2023-04-07 11:51:37 +00:00
|
|
|
}
|
|
|
|
{...clientPoliciesProfilesTab}
|
|
|
|
>
|
|
|
|
<ProfilesTab />
|
|
|
|
</Tab>
|
|
|
|
<Tab
|
|
|
|
id="policies"
|
|
|
|
data-testid="rs-policies-clientPolicies-tab"
|
|
|
|
aria-label={t("clientPoliciesSubTab")}
|
|
|
|
{...clientPoliciesPoliciesTab}
|
|
|
|
title={<TabTitleText>{t("policies")}</TabTitleText>}
|
|
|
|
tooltip={
|
2023-09-25 07:06:56 +00:00
|
|
|
<Tooltip content={t("clientPoliciesPoliciesHelpText")} />
|
2023-04-07 11:51:37 +00:00
|
|
|
}
|
|
|
|
>
|
|
|
|
<PoliciesTab />
|
|
|
|
</Tab>
|
|
|
|
</RoutableTabs>
|
|
|
|
</Tab>
|
|
|
|
)}
|
2022-06-15 12:57:39 +00:00
|
|
|
{isFeatureEnabled(Feature.DeclarativeUserProfile) &&
|
|
|
|
realm.attributes?.userProfileEnabled === "true" && (
|
|
|
|
<Tab
|
2023-09-25 07:06:56 +00:00
|
|
|
title={<TabTitleText>{t("userProfile")}</TabTitleText>}
|
2022-06-15 12:57:39 +00:00
|
|
|
data-testid="rs-user-profile-tab"
|
2023-01-04 12:30:54 +00:00
|
|
|
{...userProfileTab}
|
2022-06-15 12:57:39 +00:00
|
|
|
>
|
|
|
|
<UserProfileTab />
|
|
|
|
</Tab>
|
|
|
|
)}
|
|
|
|
<Tab
|
|
|
|
title={<TabTitleText>{t("userRegistration")}</TabTitleText>}
|
|
|
|
data-testid="rs-userRegistration-tab"
|
2023-01-04 12:30:54 +00:00
|
|
|
{...userRegistrationTab}
|
2022-06-15 12:57:39 +00:00
|
|
|
>
|
|
|
|
<UserRegistration />
|
|
|
|
</Tab>
|
|
|
|
</RoutableTabs>
|
2021-09-02 20:14:43 +00:00
|
|
|
</PageSection>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|