mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-09 23:12:06 -03:30
use users realm to edit admin user
fixes: #32915 Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com> (cherry picked from commit 5e65bdde1618804274c9da2f33a68ed4014fd1a7)
This commit is contained in:
parent
170c9d604b
commit
e15e4c679d
@ -22,7 +22,6 @@ import {
|
||||
import { useAdminClient } from "../admin-client";
|
||||
import { useAlerts } from "../components/alert/Alerts";
|
||||
import { FormAccess } from "../components/form/FormAccess";
|
||||
import { useRealm } from "../context/realm-context/RealmContext";
|
||||
import { toUser } from "../user/routes/User";
|
||||
import { emailRegexPattern } from "../util";
|
||||
import { useCurrentUser } from "../utils/useCurrentUser";
|
||||
@ -44,7 +43,6 @@ export const RealmSettingsEmailTab = ({
|
||||
const { adminClient } = useAdminClient();
|
||||
|
||||
const { t } = useTranslation();
|
||||
const { realm: realmName } = useRealm();
|
||||
const { addAlert, addError } = useAlerts();
|
||||
const currentUser = useCurrentUser();
|
||||
|
||||
@ -254,7 +252,7 @@ export const RealmSettingsEmailTab = ({
|
||||
<Link
|
||||
{...props}
|
||||
to={toUser({
|
||||
realm: realmName,
|
||||
realm: currentUser.realm!,
|
||||
id: currentUser.id!,
|
||||
tab: "settings",
|
||||
})}
|
||||
|
||||
@ -15,5 +15,5 @@ export function useCurrentUser() {
|
||||
userId,
|
||||
]);
|
||||
|
||||
return currentUser;
|
||||
return { ...currentUser, realm: whoAmI.getRealm() };
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user