2021-10-29 16:11:06 +00:00
|
|
|
import { lazy } from "react";
|
2023-01-18 12:09:49 +00:00
|
|
|
import type { Path } from "react-router-dom";
|
|
|
|
import { generatePath } from "react-router-dom";
|
2021-07-26 13:29:26 +00:00
|
|
|
import type { RouteDef } from "../../route-config";
|
|
|
|
|
|
|
|
export type NewKerberosUserFederationParams = { realm: string };
|
|
|
|
|
2023-03-24 14:37:24 +00:00
|
|
|
const UserFederationKerberosSettings = lazy(
|
|
|
|
() => import("../UserFederationKerberosSettings")
|
|
|
|
);
|
|
|
|
|
2021-07-26 13:29:26 +00:00
|
|
|
export const NewKerberosUserFederationRoute: RouteDef = {
|
|
|
|
path: "/:realm/user-federation/kerberos/new",
|
2023-03-24 14:37:24 +00:00
|
|
|
element: <UserFederationKerberosSettings />,
|
2021-07-26 13:29:26 +00:00
|
|
|
breadcrumb: (t) => t("common:settings"),
|
2023-03-27 00:31:23 +00:00
|
|
|
handle: {
|
|
|
|
access: "view-realm",
|
|
|
|
},
|
2021-07-26 13:29:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export const toNewKerberosUserFederation = (
|
|
|
|
params: NewKerberosUserFederationParams
|
2022-08-19 18:05:09 +00:00
|
|
|
): Partial<Path> => ({
|
2021-07-26 13:29:26 +00:00
|
|
|
pathname: generatePath(NewKerberosUserFederationRoute.path, params),
|
|
|
|
});
|