-
Bug
-
Resolution: Done
-
Undefined
-
None
-
False
-
-
False
-
-
Before reporting an issue
[X] I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.
Area
admin/ui
Describe the bug
When using the admin console and attempting to delete a user, a confirmation popup appears with a wrong title.
"Are you sure you want to permanently delete the provider 'provider'?"
!grafik
However, this is only the case if the delete button is pressed from the user specifig settings page. If it is used from the user list, the title is "Delete user?".
Version
26.0.6
Regression
[ ] The issue is a regression
Expected behavior
The title is the same as from the user list delete button
Actual behavior
The title is obviously wrong.
How to Reproduce?
1. Get a keycloak instance
2. Create a user
3. Open the user list, click the three dots on the right next to the user and select "delete"
- A popup appears with the right text
4. Click on the user to get to his settings, click on the "action" button top right and select "delete" - A popup appears with the wrong text
Anything else?
The issue is in EditUser.tsx in line 238.
````typescript
const [toggleDeleteDialog, DeleteConfirm] = useConfirmDialog(
titleKey: "deleteConfirm",
messageKey: "deleteConfirmCurrentUser",
continueButtonLabel: "delete",
continueButtonVariant: ButtonVariant.danger,
onConfirm: async () => {
try {
if (lightweightUser) {
await adminClient.users.logout(
);
} else {
await adminClient.users.del(
);
}
addAlert(t("userDeletedSuccess"), AlertVariant.success);
navigate(toUsers(
));
} catch (error)
},
});
````
deleteConfirm is Are you sure you want to permanently delete the provider '{{provider'?}} (messages_en.properties)
The other delete button uses deleteConfirmUsers, which is Delete user?.
Maybe it can just use this text instead? Or could this be a problem since this text is meant for deleting multiple users?
- links to