Uploaded image for project: 'Red Hat build of Keycloak'
  1. Red Hat build of Keycloak
  2. RHBK-2574

Delete user confirm title is wrong [GHI#35475]

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • 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(

      { {code}

      titleKey: "deleteConfirm",
      messageKey: "deleteConfirmCurrentUser",
      continueButtonLabel: "delete",
      continueButtonVariant: ButtonVariant.danger,
      onConfirm: async () => {
      try {
      if (lightweightUser) {
      await adminClient.users.logout(

      { id: user!.id! }

      );
      } else {
      await adminClient.users.del(

      { id: user!.id! }

      );
      }
      addAlert(t("userDeletedSuccess"), AlertVariant.success);
      navigate(toUsers(

      { realm: realmName }

      ));
      } catch (error)

      { addError("userDeletedError", 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?

              Unassigned Unassigned
              pvlha Pavel Vlha
              Keycloak UI
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: