2022-01-23 20:21:19 +00:00
|
|
|
import {
|
2022-12-02 14:54:30 +00:00
|
|
|
ActionGroup,
|
|
|
|
Button,
|
|
|
|
ExpandableSection,
|
2022-01-23 20:21:19 +00:00
|
|
|
FormGroup,
|
2022-12-02 14:54:30 +00:00
|
|
|
PageSection,
|
2022-01-23 20:21:19 +00:00
|
|
|
Select,
|
|
|
|
SelectOption,
|
2022-12-02 14:54:30 +00:00
|
|
|
SelectVariant,
|
2022-01-23 20:21:19 +00:00
|
|
|
Switch,
|
|
|
|
} from "@patternfly/react-core";
|
2022-12-02 14:54:30 +00:00
|
|
|
import { useState } from "react";
|
|
|
|
import { Controller, FormProvider, useForm } from "react-hook-form-v7";
|
|
|
|
import { useTranslation } from "react-i18next";
|
2022-01-23 20:21:19 +00:00
|
|
|
|
2022-07-06 10:30:40 +00:00
|
|
|
import type ClientRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientRepresentation";
|
|
|
|
import type EvaluationResultRepresentation from "@keycloak/keycloak-admin-client/lib/defs/evaluationResultRepresentation";
|
2022-12-02 14:54:30 +00:00
|
|
|
import type PolicyEvaluationResponse from "@keycloak/keycloak-admin-client/lib/defs/policyEvaluationResponse";
|
2022-07-06 10:30:40 +00:00
|
|
|
import type ResourceEvaluation from "@keycloak/keycloak-admin-client/lib/defs/resourceEvaluation";
|
|
|
|
import type ResourceRepresentation from "@keycloak/keycloak-admin-client/lib/defs/resourceRepresentation";
|
2022-12-02 14:54:30 +00:00
|
|
|
import type RoleRepresentation from "@keycloak/keycloak-admin-client/lib/defs/roleRepresentation";
|
2022-07-06 10:30:40 +00:00
|
|
|
import type ScopeRepresentation from "@keycloak/keycloak-admin-client/lib/defs/scopeRepresentation";
|
|
|
|
|
2022-12-02 14:54:30 +00:00
|
|
|
import { ClientSelect } from "../../components/client/ClientSelect";
|
2022-01-23 20:21:19 +00:00
|
|
|
import { FormAccess } from "../../components/form-access/FormAccess";
|
|
|
|
import { HelpItem } from "../../components/help-enabler/HelpItem";
|
2022-12-02 14:54:30 +00:00
|
|
|
import type { KeyValueType } from "../../components/key-value-form/key-value-convert";
|
|
|
|
import { KeycloakTextInput } from "../../components/keycloak-text-input/KeycloakTextInput";
|
2022-01-23 20:21:19 +00:00
|
|
|
import { FormPanel } from "../../components/scroll-form/FormPanel";
|
2022-12-02 14:54:30 +00:00
|
|
|
import { UserSelect } from "../../components/users/UserSelect";
|
|
|
|
import { useAccess } from "../../context/access/Access";
|
2022-01-23 20:21:19 +00:00
|
|
|
import { useAdminClient, useFetch } from "../../context/auth/AdminClient";
|
|
|
|
import { useRealm } from "../../context/realm-context/RealmContext";
|
2022-06-13 09:09:07 +00:00
|
|
|
import { ForbiddenSection } from "../../ForbiddenSection";
|
2022-12-02 14:54:30 +00:00
|
|
|
import { FormFields } from "../ClientDetails";
|
|
|
|
import { defaultContextAttributes } from "../utils";
|
2022-07-06 10:30:40 +00:00
|
|
|
import { Results } from "./evaluate/Results";
|
2022-12-02 14:54:30 +00:00
|
|
|
import { KeyBasedAttributeInput } from "./KeyBasedAttributeInput";
|
2022-06-13 10:13:36 +00:00
|
|
|
|
|
|
|
import "./auth-evaluate.css";
|
2022-02-15 17:52:46 +00:00
|
|
|
|
|
|
|
interface EvaluateFormInputs
|
|
|
|
extends Omit<ResourceEvaluation, "context" | "resources"> {
|
|
|
|
alias: string;
|
|
|
|
authScopes: string[];
|
|
|
|
context: {
|
|
|
|
attributes: Record<string, string>[];
|
|
|
|
};
|
2022-07-06 10:30:40 +00:00
|
|
|
resources?: Record<string, string>[];
|
2022-12-02 14:54:30 +00:00
|
|
|
client: FormFields;
|
2022-07-06 10:30:40 +00:00
|
|
|
user: string[];
|
2022-02-15 17:52:46 +00:00
|
|
|
}
|
2022-01-23 20:21:19 +00:00
|
|
|
|
|
|
|
export type AttributeType = {
|
|
|
|
key: string;
|
|
|
|
name: string;
|
|
|
|
custom?: boolean;
|
|
|
|
values?: {
|
|
|
|
[key: string]: string;
|
|
|
|
}[];
|
|
|
|
};
|
|
|
|
|
|
|
|
type ClientSettingsProps = {
|
2022-03-07 14:28:42 +00:00
|
|
|
client: ClientRepresentation;
|
2022-01-23 20:21:19 +00:00
|
|
|
save: () => void;
|
|
|
|
};
|
|
|
|
|
2022-02-15 17:52:46 +00:00
|
|
|
export type AttributeForm = Omit<
|
|
|
|
EvaluateFormInputs,
|
|
|
|
"context" | "resources"
|
|
|
|
> & {
|
|
|
|
context: {
|
|
|
|
attributes?: KeyValueType[];
|
|
|
|
};
|
|
|
|
resources?: KeyValueType[];
|
|
|
|
};
|
|
|
|
|
2022-02-17 16:03:18 +00:00
|
|
|
type Props = ClientSettingsProps & EvaluationResultRepresentation;
|
|
|
|
|
2022-03-07 14:28:42 +00:00
|
|
|
export const AuthorizationEvaluate = ({ client }: Props) => {
|
2022-07-06 10:30:40 +00:00
|
|
|
const form = useForm<EvaluateFormInputs>({ mode: "onChange" });
|
|
|
|
const {
|
|
|
|
control,
|
|
|
|
register,
|
|
|
|
reset,
|
|
|
|
trigger,
|
2022-12-02 14:54:30 +00:00
|
|
|
formState: { isValid, errors },
|
2022-07-06 10:30:40 +00:00
|
|
|
} = form;
|
2022-01-23 20:21:19 +00:00
|
|
|
const { t } = useTranslation("clients");
|
2022-07-14 13:02:28 +00:00
|
|
|
const { adminClient } = useAdminClient();
|
2022-01-23 20:21:19 +00:00
|
|
|
const realm = useRealm();
|
|
|
|
|
|
|
|
const [scopesDropdownOpen, setScopesDropdownOpen] = useState(false);
|
|
|
|
|
|
|
|
const [roleDropdownOpen, setRoleDropdownOpen] = useState(false);
|
|
|
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
|
|
const [applyToResourceType, setApplyToResourceType] = useState(false);
|
|
|
|
const [resources, setResources] = useState<ResourceRepresentation[]>([]);
|
|
|
|
const [scopes, setScopes] = useState<ScopeRepresentation[]>([]);
|
2022-07-06 10:30:40 +00:00
|
|
|
const [evaluateResult, setEvaluateResult] =
|
|
|
|
useState<PolicyEvaluationResponse>();
|
2022-02-17 16:03:18 +00:00
|
|
|
|
2022-03-07 14:28:42 +00:00
|
|
|
const [clientRoles, setClientRoles] = useState<RoleRepresentation[]>([]);
|
2022-03-11 10:19:20 +00:00
|
|
|
|
2022-06-13 09:09:07 +00:00
|
|
|
const { hasAccess } = useAccess();
|
|
|
|
if (!hasAccess("view-users"))
|
|
|
|
return <ForbiddenSection permissionNeeded="view-users" />;
|
|
|
|
|
2022-03-07 14:28:42 +00:00
|
|
|
useFetch(
|
2022-07-06 10:30:40 +00:00
|
|
|
() => adminClient.roles.find(),
|
|
|
|
(roles) => {
|
2022-03-07 14:28:42 +00:00
|
|
|
setClientRoles(roles);
|
|
|
|
},
|
|
|
|
[]
|
|
|
|
);
|
|
|
|
|
2022-01-23 20:21:19 +00:00
|
|
|
useFetch(
|
2022-03-11 10:19:20 +00:00
|
|
|
() =>
|
2022-01-23 20:21:19 +00:00
|
|
|
Promise.all([
|
|
|
|
adminClient.clients.listResources({
|
2022-03-07 14:28:42 +00:00
|
|
|
id: client.id!,
|
2022-01-23 20:21:19 +00:00
|
|
|
}),
|
|
|
|
adminClient.clients.listAllScopes({
|
2022-03-07 14:28:42 +00:00
|
|
|
id: client.id!,
|
2022-01-23 20:21:19 +00:00
|
|
|
}),
|
|
|
|
]),
|
|
|
|
([resources, scopes]) => {
|
|
|
|
setResources(resources);
|
|
|
|
setScopes(scopes);
|
|
|
|
},
|
2022-07-06 10:30:40 +00:00
|
|
|
[]
|
2022-01-23 20:21:19 +00:00
|
|
|
);
|
|
|
|
|
2022-02-15 17:52:46 +00:00
|
|
|
const evaluate = async () => {
|
|
|
|
if (!(await trigger())) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
const formValues = form.getValues();
|
2022-07-06 10:30:40 +00:00
|
|
|
const keys = formValues.resources?.map(({ key }) => key);
|
2022-01-23 20:21:19 +00:00
|
|
|
const resEval: ResourceEvaluation = {
|
|
|
|
roleIds: formValues.roleIds ?? [],
|
2022-03-07 14:28:42 +00:00
|
|
|
clientId: formValues.client.id!,
|
2022-07-06 10:30:40 +00:00
|
|
|
userId: formValues.user[0],
|
|
|
|
resources: formValues.resources?.filter((resource) =>
|
|
|
|
keys?.includes(resource.name!)
|
2022-03-18 13:28:31 +00:00
|
|
|
),
|
2022-01-23 20:21:19 +00:00
|
|
|
entitlements: false,
|
2022-02-15 17:52:46 +00:00
|
|
|
context: {
|
|
|
|
attributes: Object.fromEntries(
|
|
|
|
formValues.context.attributes
|
|
|
|
.filter((item) => item.key || item.value !== "")
|
|
|
|
.map(({ key, value }) => [key, value])
|
|
|
|
),
|
|
|
|
},
|
2022-01-23 20:21:19 +00:00
|
|
|
};
|
2022-02-15 17:52:46 +00:00
|
|
|
|
2022-02-17 16:03:18 +00:00
|
|
|
const evaluation = await adminClient.clients.evaluateResource(
|
2022-03-07 14:28:42 +00:00
|
|
|
{ id: client.id!, realm: realm.realm },
|
2022-01-23 20:21:19 +00:00
|
|
|
resEval
|
|
|
|
);
|
2022-02-17 16:03:18 +00:00
|
|
|
|
2022-07-06 10:30:40 +00:00
|
|
|
setEvaluateResult(evaluation);
|
|
|
|
return evaluation;
|
2022-02-17 16:03:18 +00:00
|
|
|
};
|
|
|
|
|
2022-07-06 10:30:40 +00:00
|
|
|
if (evaluateResult) {
|
|
|
|
return (
|
|
|
|
<Results
|
|
|
|
evaluateResult={evaluateResult}
|
|
|
|
refresh={evaluate}
|
|
|
|
back={() => setEvaluateResult(undefined)}
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
return (
|
2022-01-23 20:21:19 +00:00
|
|
|
<PageSection>
|
2022-07-06 10:30:40 +00:00
|
|
|
<FormProvider {...form}>
|
|
|
|
<FormPanel
|
|
|
|
className="kc-identity-information"
|
|
|
|
title={t("clients:identityInformation")}
|
2022-01-23 20:21:19 +00:00
|
|
|
>
|
2022-07-06 10:30:40 +00:00
|
|
|
<FormAccess isHorizontal role="view-clients">
|
|
|
|
<ClientSelect
|
2022-03-07 14:28:42 +00:00
|
|
|
name="client"
|
2022-07-06 10:30:40 +00:00
|
|
|
label="client"
|
|
|
|
namespace="clients"
|
|
|
|
helpText={"clients-help:client"}
|
|
|
|
defaultValue={client.clientId}
|
2022-01-23 20:21:19 +00:00
|
|
|
/>
|
2022-07-06 10:30:40 +00:00
|
|
|
<UserSelect
|
2022-03-07 14:28:42 +00:00
|
|
|
name="user"
|
2022-07-06 10:30:40 +00:00
|
|
|
label="users"
|
|
|
|
helpText="clients-help:selectUser"
|
2022-01-23 20:21:19 +00:00
|
|
|
defaultValue=""
|
2022-07-06 10:30:40 +00:00
|
|
|
variant={SelectVariant.typeahead}
|
|
|
|
isRequired
|
2022-01-23 20:21:19 +00:00
|
|
|
/>
|
|
|
|
<FormGroup
|
2022-07-06 10:30:40 +00:00
|
|
|
label={t("roles")}
|
2022-01-23 20:21:19 +00:00
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
2022-07-06 10:30:40 +00:00
|
|
|
helpText="clients-help:roles"
|
|
|
|
fieldLabelId="clients:roles"
|
2022-01-23 20:21:19 +00:00
|
|
|
/>
|
|
|
|
}
|
2022-07-06 10:30:40 +00:00
|
|
|
fieldId="realmRole"
|
|
|
|
validated={errors.roleIds ? "error" : "default"}
|
2022-01-23 20:21:19 +00:00
|
|
|
helperTextInvalid={t("common:required")}
|
2022-07-06 10:30:40 +00:00
|
|
|
isRequired
|
|
|
|
>
|
|
|
|
<Controller
|
|
|
|
name="roleIds"
|
|
|
|
control={control}
|
|
|
|
defaultValue={[]}
|
2022-12-02 14:54:30 +00:00
|
|
|
rules={{ validate: (value) => (value || "").length > 0 }}
|
|
|
|
render={({ field }) => (
|
2022-07-06 10:30:40 +00:00
|
|
|
<Select
|
2022-12-02 14:54:30 +00:00
|
|
|
placeholderText={t("selectARole")}
|
2022-07-06 10:30:40 +00:00
|
|
|
variant={SelectVariant.typeaheadMulti}
|
|
|
|
toggleId="role"
|
|
|
|
onToggle={setRoleDropdownOpen}
|
2022-12-02 14:54:30 +00:00
|
|
|
selections={field.value}
|
2022-07-06 10:30:40 +00:00
|
|
|
onSelect={(_, v) => {
|
|
|
|
const option = v.toString();
|
2022-12-02 14:54:30 +00:00
|
|
|
if (field.value?.includes(option)) {
|
|
|
|
field.onChange(
|
|
|
|
field.value.filter((item: string) => item !== option)
|
2022-07-06 10:30:40 +00:00
|
|
|
);
|
|
|
|
} else {
|
2022-12-02 14:54:30 +00:00
|
|
|
field.onChange([...(field.value || []), option]);
|
2022-07-06 10:30:40 +00:00
|
|
|
}
|
|
|
|
setRoleDropdownOpen(false);
|
|
|
|
}}
|
|
|
|
onClear={(event) => {
|
|
|
|
event.stopPropagation();
|
2022-12-02 14:54:30 +00:00
|
|
|
field.onChange([]);
|
2022-07-06 10:30:40 +00:00
|
|
|
}}
|
|
|
|
aria-label={t("realmRole")}
|
|
|
|
isOpen={roleDropdownOpen}
|
|
|
|
>
|
|
|
|
{clientRoles.map((role) => (
|
|
|
|
<SelectOption
|
2022-12-02 14:54:30 +00:00
|
|
|
selected={role.name === field.value}
|
2022-07-06 10:30:40 +00:00
|
|
|
key={role.name}
|
|
|
|
value={role.name}
|
|
|
|
/>
|
|
|
|
))}
|
|
|
|
</Select>
|
|
|
|
)}
|
|
|
|
/>
|
|
|
|
</FormGroup>
|
|
|
|
</FormAccess>
|
|
|
|
</FormPanel>
|
|
|
|
<FormPanel className="kc-permissions" title={t("common:permissions")}>
|
|
|
|
<FormAccess isHorizontal role="view-clients">
|
|
|
|
<FormGroup
|
|
|
|
label={t("applyToResourceType")}
|
|
|
|
fieldId="applyToResourceType"
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
|
|
|
helpText="clients-help:applyToResourceType"
|
|
|
|
fieldLabelId="clients:applyToResourceType"
|
|
|
|
/>
|
|
|
|
}
|
2022-01-23 20:21:19 +00:00
|
|
|
>
|
2022-07-06 10:30:40 +00:00
|
|
|
<Switch
|
|
|
|
id="applyToResource-switch"
|
|
|
|
label={t("common:on")}
|
|
|
|
labelOff={t("common:off")}
|
|
|
|
isChecked={applyToResourceType}
|
|
|
|
onChange={setApplyToResourceType}
|
2022-08-30 13:07:51 +00:00
|
|
|
aria-label={t("applyToResourceType")}
|
2022-01-23 20:21:19 +00:00
|
|
|
/>
|
|
|
|
</FormGroup>
|
2022-07-06 10:30:40 +00:00
|
|
|
|
|
|
|
{!applyToResourceType ? (
|
2022-01-23 20:21:19 +00:00
|
|
|
<FormGroup
|
2022-07-06 10:30:40 +00:00
|
|
|
label={t("resourcesAndAuthScopes")}
|
|
|
|
id="resourcesAndAuthScopes"
|
2022-01-23 20:21:19 +00:00
|
|
|
isRequired
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
2022-07-06 10:30:40 +00:00
|
|
|
helpText={t("clients-help:contextualAttributes")}
|
|
|
|
fieldLabelId={`resourcesAndAuthScopes`}
|
2022-01-23 20:21:19 +00:00
|
|
|
/>
|
|
|
|
}
|
2022-07-06 10:30:40 +00:00
|
|
|
helperTextInvalid={t("common:required")}
|
|
|
|
fieldId="resourcesAndAuthScopes"
|
2022-01-23 20:21:19 +00:00
|
|
|
>
|
2022-07-06 10:30:40 +00:00
|
|
|
<KeyBasedAttributeInput
|
|
|
|
selectableValues={resources.map<AttributeType>((item) => ({
|
|
|
|
name: item.name!,
|
|
|
|
key: item._id!,
|
|
|
|
}))}
|
|
|
|
resources={resources}
|
|
|
|
name="resources"
|
2022-01-23 20:21:19 +00:00
|
|
|
/>
|
|
|
|
</FormGroup>
|
2022-07-06 10:30:40 +00:00
|
|
|
) : (
|
|
|
|
<>
|
|
|
|
<FormGroup
|
|
|
|
label={t("resourceType")}
|
|
|
|
isRequired
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
|
|
|
helpText="clients-help:resourceType"
|
|
|
|
fieldLabelId="clients:resourceType"
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
fieldId="client"
|
2022-12-02 14:54:30 +00:00
|
|
|
validated={errors.alias ? "error" : "default"}
|
2022-07-06 10:30:40 +00:00
|
|
|
helperTextInvalid={t("common:required")}
|
|
|
|
>
|
|
|
|
<KeycloakTextInput
|
|
|
|
id="alias"
|
|
|
|
data-testid="alias"
|
2022-12-02 14:54:30 +00:00
|
|
|
{...register("alias", { required: true })}
|
2022-07-06 10:30:40 +00:00
|
|
|
/>
|
|
|
|
</FormGroup>
|
|
|
|
<FormGroup
|
|
|
|
label={t("authScopes")}
|
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
|
|
|
helpText="clients-help:scopesSelect"
|
|
|
|
fieldLabelId="clients:client"
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
fieldId="authScopes"
|
|
|
|
>
|
|
|
|
<Controller
|
|
|
|
name="authScopes"
|
|
|
|
defaultValue={[]}
|
|
|
|
control={control}
|
2022-12-02 14:54:30 +00:00
|
|
|
render={({ field }) => (
|
2022-07-06 10:30:40 +00:00
|
|
|
<Select
|
|
|
|
toggleId="authScopes"
|
|
|
|
onToggle={setScopesDropdownOpen}
|
|
|
|
onSelect={(_, v) => {
|
|
|
|
const option = v.toString();
|
2022-12-02 14:54:30 +00:00
|
|
|
if (field.value.includes(option)) {
|
|
|
|
field.onChange(
|
|
|
|
field.value.filter(
|
|
|
|
(item: string) => item !== option
|
|
|
|
)
|
2022-07-06 10:30:40 +00:00
|
|
|
);
|
|
|
|
} else {
|
2022-12-02 14:54:30 +00:00
|
|
|
field.onChange([...field.value, option]);
|
2022-07-06 10:30:40 +00:00
|
|
|
}
|
|
|
|
setScopesDropdownOpen(false);
|
|
|
|
}}
|
2022-12-02 14:54:30 +00:00
|
|
|
selections={field.value}
|
2022-07-06 10:30:40 +00:00
|
|
|
variant={SelectVariant.typeaheadMulti}
|
|
|
|
aria-label={t("authScopes")}
|
|
|
|
isOpen={scopesDropdownOpen}
|
|
|
|
>
|
|
|
|
{scopes.map((scope) => (
|
|
|
|
<SelectOption
|
2022-12-02 14:54:30 +00:00
|
|
|
selected={field.value.includes(scope.name!)}
|
2022-07-06 10:30:40 +00:00
|
|
|
key={scope.id}
|
|
|
|
value={scope.name}
|
|
|
|
/>
|
|
|
|
))}
|
|
|
|
</Select>
|
|
|
|
)}
|
|
|
|
/>
|
|
|
|
</FormGroup>
|
|
|
|
</>
|
|
|
|
)}
|
|
|
|
<ExpandableSection
|
|
|
|
toggleText={t("contextualInfo")}
|
|
|
|
onToggle={() => setIsExpanded(!isExpanded)}
|
|
|
|
isExpanded={isExpanded}
|
|
|
|
>
|
2022-01-23 20:21:19 +00:00
|
|
|
<FormGroup
|
2022-07-06 10:30:40 +00:00
|
|
|
label={t("contextualAttributes")}
|
|
|
|
id="contextualAttributes"
|
2022-01-23 20:21:19 +00:00
|
|
|
labelIcon={
|
|
|
|
<HelpItem
|
2022-07-06 10:30:40 +00:00
|
|
|
helpText={t("clients-help:contextualAttributes")}
|
|
|
|
fieldLabelId={`contextualAttributes`}
|
2022-01-23 20:21:19 +00:00
|
|
|
/>
|
|
|
|
}
|
2022-07-06 10:30:40 +00:00
|
|
|
helperTextInvalid={t("common:required")}
|
|
|
|
fieldId="contextualAttributes"
|
2022-01-23 20:21:19 +00:00
|
|
|
>
|
2022-07-06 10:30:40 +00:00
|
|
|
<KeyBasedAttributeInput
|
|
|
|
selectableValues={defaultContextAttributes}
|
|
|
|
name="context.attributes"
|
2022-01-23 20:21:19 +00:00
|
|
|
/>
|
|
|
|
</FormGroup>
|
2022-07-06 10:30:40 +00:00
|
|
|
</ExpandableSection>
|
|
|
|
</FormAccess>
|
|
|
|
<ActionGroup>
|
|
|
|
<Button
|
|
|
|
data-testid="authorization-eval"
|
2022-07-15 17:27:12 +00:00
|
|
|
id="authorization-eval"
|
|
|
|
className="pf-u-mr-md"
|
2022-07-06 10:30:40 +00:00
|
|
|
isDisabled={!isValid}
|
|
|
|
onClick={() => evaluate()}
|
2022-01-23 20:21:19 +00:00
|
|
|
>
|
2022-07-06 10:30:40 +00:00
|
|
|
{t("evaluate")}
|
|
|
|
</Button>
|
|
|
|
<Button
|
|
|
|
data-testid="authorization-revert"
|
2022-07-15 17:27:12 +00:00
|
|
|
id="authorization-revert"
|
|
|
|
className="pf-u-mr-md"
|
2022-07-06 10:30:40 +00:00
|
|
|
variant="link"
|
|
|
|
onClick={() => reset()}
|
|
|
|
>
|
|
|
|
{t("common:revert")}
|
|
|
|
</Button>
|
|
|
|
</ActionGroup>
|
|
|
|
</FormPanel>
|
|
|
|
</FormProvider>
|
2022-01-23 20:21:19 +00:00
|
|
|
</PageSection>
|
|
|
|
);
|
|
|
|
};
|