Skip to main content

4.22. Organisation Approver - Recover organisation users marked for deletion

Id 4.22.
Description

As an Organisation Administrator,

 

I want to be able to recover a user marked for deletion that belongs to my organisation,

 

So that I can recover the access of a user that was deleted by mistake.

Priority Low
Actors Organisation Administrator
API Calls GET /admin/api-users/<user-id>
PUT /admin/api-users/<user-id>
PATCH /admin/api-users/<user-id>
Linked Processes
Status Implemented

Preconditions

  1. The User must be authenticated and have the Organisation Administrator role.
  2. The system must have a list of predefined roles available for assignment.
  3. The user to be recovered must belong to the Organisation Administrator’s organisation, be marked for deletion and not yet be deleted.

Postconditions

  1. The user is not marked as inactive any more.
  2. The user is enabled and can again login and use the system in accordance with the assigned roles.

Main flow

  1. The Organisation Administrator retrieves the user that belongs to his organisation and is marked for deletion (GET).
  2. The Organisation Administrator uses an API to recover the user removing the flag “marked for deletion” (PUT/PATCH).
  3. The system validates the input data.
  4. The system saves the changes and updates the user list.

Exceptions

[400 Bad Request] Invalid input:

If mandatory fields are missing or invalid, the system returns an error message.

[404 Not found] User not found

If the Organisation Administrator attempts to recover a user that does not exist or does not belong to his organisation, the system returns an error and prevents the action.

[409 Not marked for deletion] User not marked for deletion

If the Organisation Administrator attempts to recover a user that is not marked for deleting, the system returns an error and prevents the action.

[500 Internal Server Error] System Error

If the system fails to save changes due to an internal error, it displays an appropriate message and logs the error for further investigation.