From 62c402872a3687a04b8d6f325cd2dbee27c3e1d8 Mon Sep 17 00:00:00 2001 From: agagancarczyk <4890675+agagancarczyk@users.noreply.github.com> Date: Tue, 20 Feb 2024 10:08:00 +0000 Subject: [PATCH] fixed bug (#27145) Signed-off-by: Agnieszka Gancarczyk Co-authored-by: Agnieszka Gancarczyk --- js/apps/admin-ui/src/user/UserForm.tsx | 3 +++ .../admin-ui/src/user/user-credentials/ResetPasswordDialog.tsx | 1 + 2 files changed, 4 insertions(+) diff --git a/js/apps/admin-ui/src/user/UserForm.tsx b/js/apps/admin-ui/src/user/UserForm.tsx index a1c5e3f6d0..294d04dea8 100644 --- a/js/apps/admin-ui/src/user/UserForm.tsx +++ b/js/apps/admin-ui/src/user/UserForm.tsx @@ -69,6 +69,7 @@ export const UserForm = ({ const { handleSubmit, register, + setValue, watch, control, reset, @@ -81,6 +82,8 @@ export const UserForm = ({ const [open, setOpen] = useState(false); const [locked, setLocked] = useState(isLocked); + setValue("requiredActions", user?.requiredActions || []); + const unLockUser = async () => { try { await adminClient.attackDetection.del({ id: user!.id! }); diff --git a/js/apps/admin-ui/src/user/user-credentials/ResetPasswordDialog.tsx b/js/apps/admin-ui/src/user/user-credentials/ResetPasswordDialog.tsx index 8335785a7a..45d6d3665e 100644 --- a/js/apps/admin-ui/src/user/user-credentials/ResetPasswordDialog.tsx +++ b/js/apps/admin-ui/src/user/user-credentials/ResetPasswordDialog.tsx @@ -88,6 +88,7 @@ export const ResetPasswordDialog = ({ value: password, }, }); + user.requiredActions = ["UPDATE_PASSWORD"]; const credentials = await adminClient.users.getCredentials({ id: user.id!, });