Error when deleting a user without Keycloak record

Description

Preconditions:

  • A user without Keycloak record exists in the system

    • If a user was created in UI (or via API using POST /users call), and no capabilities/creds/roles were assigned to it, a user would not have a Keycloak record

Steps to Reproduce:

  1. Login to https://folio-etesting-snapshot-diku.ci.folio.org/ tenant as an admin user

  2. Go to "Users" app

  3. Open detailed view of a user from Preconditions

  4. Click on "Actions" button on the third pane → Select "Check for open transactions/delete user" option

  5. Click on “Yes“ button in appeared modal

Expected Results: A user is deleted without errors. Modal is closed, deleted user’s detailed view is closed, deleted user disappeared from users list.

Actual Results: Modal remains opened. Error pop-up appears. In DevTools DELETE /users-keycloak/users/<<UUID>> call fails with 404 status and the following response body:

Additional Information:

 

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Attachments

2

Checklist

hide

Activity

Show:

Yury Barsukou January 28, 2025 at 1:50 PM

Tested on bugfest ecs and non ecs, fixed on both, video added. Closing

Craig McNally January 16, 2025 at 8:59 PM

Let’s get this released and an RCA assigned here please. cc ,

Yury Barsukou January 10, 2025 at 11:52 AM

Tested on both Snapshots - fixed. Need to recheck on bugfest after deployment

Craig McNally December 3, 2024 at 10:21 PM

I think this should be handled on the backend.

Ryan Berger December 3, 2024 at 9:32 PM

Should the UI check for keycloak record before deleting and create one if it doesn’t exist like we did for ? Or should the back-end handle this more gracefully?

Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Eureka

Fix versions

Release

Ramsons (R2 2024) Bug Fix

RCA Group

Implementation coding issue

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs
Created November 27, 2024 at 11:16 AM
Updated January 28, 2025 at 1:51 PM
Resolved January 10, 2025 at 1:21 PM
TestRail: Cases
TestRail: Runs