Fix redirection on remove all associated roles (#3160)
This commit is contained in:
parent
9e4ecc8a1b
commit
e74969b9e0
1 changed files with 15 additions and 2 deletions
|
@ -264,8 +264,7 @@ export default function RealmRoleTabs() {
|
||||||
AlertVariant.success,
|
AlertVariant.success,
|
||||||
t("compositesRemovedAlertDescription")
|
t("compositesRemovedAlertDescription")
|
||||||
);
|
);
|
||||||
const loc = url.replace(/\/AssociatedRoles/g, "/details");
|
toDetail();
|
||||||
navigate(loc);
|
|
||||||
refresh();
|
refresh();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
addError("roles:roleDeleteError", error);
|
addError("roles:roleDeleteError", error);
|
||||||
|
@ -281,6 +280,20 @@ export default function RealmRoleTabs() {
|
||||||
ClientRoleRoute.path
|
ClientRoleRoute.path
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const toDetail = () => {
|
||||||
|
const to = clientRoleRouteMatch
|
||||||
|
? toClientRole({
|
||||||
|
...clientRoleRouteMatch.params,
|
||||||
|
tab: "details",
|
||||||
|
})
|
||||||
|
: toRealmRole({
|
||||||
|
realm: realm?.realm!,
|
||||||
|
id,
|
||||||
|
tab: "details",
|
||||||
|
});
|
||||||
|
navigate(to);
|
||||||
|
};
|
||||||
|
|
||||||
const toAssociatedRoles = () => {
|
const toAssociatedRoles = () => {
|
||||||
const to = clientRoleRouteMatch
|
const to = clientRoleRouteMatch
|
||||||
? toClientRole({
|
? toClientRole({
|
||||||
|
|
Loading…
Reference in a new issue