parent
b4738bf897
commit
d4b1230260
3 changed files with 11 additions and 12 deletions
|
@ -284,7 +284,7 @@ export default function ClientProfileForm() {
|
||||||
component={(props) => (
|
component={(props) => (
|
||||||
<Link
|
<Link
|
||||||
{...props}
|
{...props}
|
||||||
to={`/${realm}/realm-settings/clientPolicies`}
|
to={toClientPolicies({ realm, tab: "profiles" })}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
data-testid={"cancelCreateProfile"}
|
data-testid={"cancelCreateProfile"}
|
||||||
|
@ -466,7 +466,7 @@ export default function ClientProfileForm() {
|
||||||
component={(props) => (
|
component={(props) => (
|
||||||
<Link
|
<Link
|
||||||
{...props}
|
{...props}
|
||||||
to={`/${realm}/realm-settings/clientPolicies`}
|
to={toClientPolicies({ realm, tab: "profiles" })}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
variant="primary"
|
variant="primary"
|
||||||
|
|
|
@ -194,9 +194,7 @@ export default function NewClientPolicyCondition() {
|
||||||
policies: updatedPolicies,
|
policies: updatedPolicies,
|
||||||
});
|
});
|
||||||
setPolicies(updatedPolicies);
|
setPolicies(updatedPolicies);
|
||||||
history.push(
|
history.push(toEditClientPolicy({ realm, policyName }));
|
||||||
`/${realm}/realm-settings/clientPolicies/${policyName}/edit-policy`
|
|
||||||
);
|
|
||||||
addAlert(
|
addAlert(
|
||||||
conditionName
|
conditionName
|
||||||
? t("realm-settings:updateClientConditionSuccess")
|
? t("realm-settings:updateClientConditionSuccess")
|
||||||
|
|
|
@ -36,7 +36,10 @@ import type ClientPolicyRepresentation from "@keycloak/keycloak-admin-client/lib
|
||||||
import { toNewClientPolicyCondition } from "./routes/AddCondition";
|
import { toNewClientPolicyCondition } from "./routes/AddCondition";
|
||||||
import { useServerInfo } from "../context/server-info/ServerInfoProvider";
|
import { useServerInfo } from "../context/server-info/ServerInfoProvider";
|
||||||
import { toEditClientPolicyCondition } from "./routes/EditCondition";
|
import { toEditClientPolicyCondition } from "./routes/EditCondition";
|
||||||
import type { EditClientPolicyParams } from "./routes/EditClientPolicy";
|
import {
|
||||||
|
EditClientPolicyParams,
|
||||||
|
toEditClientPolicy,
|
||||||
|
} from "./routes/EditClientPolicy";
|
||||||
import { AddClientProfileModal } from "./AddClientProfileModal";
|
import { AddClientProfileModal } from "./AddClientProfileModal";
|
||||||
import type ClientProfileRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientProfileRepresentation";
|
import type ClientProfileRepresentation from "@keycloak/keycloak-admin-client/lib/defs/clientProfileRepresentation";
|
||||||
import { toClientPolicies } from "./routes/ClientPolicies";
|
import { toClientPolicies } from "./routes/ClientPolicies";
|
||||||
|
@ -245,7 +248,7 @@ export default function NewClientPolicyForm() {
|
||||||
AlertVariant.success
|
AlertVariant.success
|
||||||
);
|
);
|
||||||
history.push(
|
history.push(
|
||||||
`/${realm}/realm-settings/clientPolicies/${createdForm.name}/edit-policy`
|
toEditClientPolicy({ realm, policyName: createdForm.name! })
|
||||||
);
|
);
|
||||||
setShowAddConditionsAndProfilesForm(true);
|
setShowAddConditionsAndProfilesForm(true);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
@ -299,7 +302,7 @@ export default function NewClientPolicyForm() {
|
||||||
});
|
});
|
||||||
addAlert(t("deleteConditionSuccess"), AlertVariant.success);
|
addAlert(t("deleteConditionSuccess"), AlertVariant.success);
|
||||||
history.push(
|
history.push(
|
||||||
`/${realm}/realm-settings/clientPolicies/${formValues.name}/edit-policy`
|
toEditClientPolicy({ realm, policyName: formValues.name! })
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
addError(t("deleteConditionError"), error);
|
addError(t("deleteConditionError"), error);
|
||||||
|
@ -344,7 +347,7 @@ export default function NewClientPolicyForm() {
|
||||||
});
|
});
|
||||||
addAlert(t("deleteClientPolicyProfileSuccess"), AlertVariant.success);
|
addAlert(t("deleteClientPolicyProfileSuccess"), AlertVariant.success);
|
||||||
history.push(
|
history.push(
|
||||||
`/${realm}/realm-settings/clientPolicies/${formValues.name}/edit-policy`
|
toEditClientPolicy({ realm, policyName: formValues.name! })
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
addError(t("deleteClientPolicyProfileError"), error);
|
addError(t("deleteClientPolicyProfileError"), error);
|
||||||
|
@ -407,9 +410,7 @@ export default function NewClientPolicyForm() {
|
||||||
policies: newPolicies,
|
policies: newPolicies,
|
||||||
});
|
});
|
||||||
setPolicies(newPolicies);
|
setPolicies(newPolicies);
|
||||||
history.push(
|
history.push(toEditClientPolicy({ realm, policyName: formValues.name! }));
|
||||||
`/${realm}/realm-settings/clientPolicies/${formValues.name}/edit-policy`
|
|
||||||
);
|
|
||||||
addAlert(
|
addAlert(
|
||||||
t("realm-settings:addClientProfileSuccess"),
|
t("realm-settings:addClientProfileSuccess"),
|
||||||
AlertVariant.success
|
AlertVariant.success
|
||||||
|
|
Loading…
Reference in a new issue