4.7. Application Administrator - Recover users marked for deletion
| Id | 4.7. |
| Description | As a Application Administrator, I must be able to recover a user marked for deletion, So that I can recover the access of a user that was deleted by mistake. |
| Priority | High |
| Actors | Application 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
- The User must be authenticated and have the Application Administrator role.
- The system must have a list of predefined roles available for assignment.
- The user to be recovered must be inactive and not yet be deleted.
Postconditions
- The user is active.
- The user can again login and use the system in accordance with the assigned roles.
Main flow
- The Application Administrator retrieves the user that is marked for deletion (GET).
- The Application Administrator uses an API to recover the user removing the flag “marked for deletion” (PUT/PATCH).
- The system validates the input data.
- 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 Application Administrator attempts to recover a user that does not exist, the system returns an error and prevents the action.
[409 Not marked for deletion] User not marked for deletion
If the Applicaiton 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.
No comments to display
No comments to display