sovity/authority-portal

Deleting the last user of an organisation shows faulty behaviour

Closed this issue · 1 comments

Description - What happened? *

If an organisation consists of only one user and an authority admin tries to delete this user, a message appears that the user could not be deleted but after that then the organisation can no longer be displayed in the UI when it is being clicked on after page refresh.

Expected Behavior *

Delete participant should work properly, a proper message should be displayed and the flow should be working depending on whether the deletion of the last user of an org is wanted or not, but under no circumstances this error message and faulty flow should be displayed.

Observed Behavior *

During my test, when I tried to delete the last user of an organisation, I first received an error message that the user could not be deleted and then the organisation could no longer be displayed. I now neither know whether the user has been deleted nor how to get back from this error state for the orga.

Steps to Reproduce

  1. Log in as an authority admin.
  2. Navigate to "Organizations".
  3. Select any pending or active participants
  4. Open Organization Details and go to User Overview for that company //with just 1 user in orga
  5. Click on "Delete user" -> Delete user confirmation popup window is displayed
  6. Click on delete button on confirmation popup window and error is displayed

Context Information

No response

Relevant log output

No response

Screenshots

Org with only 1 user

image

after deleting the user when clicking the org after page refresh:

image

Cannot reproduce fully.
I agree that the organization detail slide over should close and the organization list should refresh to reflect the deleted organization but I cannot see any error banner saying that it failed to delete the user.

The 500 occurs because the portal tries to re-load the organization data of an organization that is already deleted

Image
Image