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
- The User must be authenticated and have the Organisation Administrator role.
- The system must have a list of predefined roles available for assignment.
- The user to be recovered must belong to the Organisation Administrator’s organisation, be marked for deletion and not yet be deleted.
Postconditions
- The user is not marked as inactive any more.
- The user is enabled and can again login and use the system in accordance with the assigned roles.
Main flow
- The Organisation Administrator retrieves the user that belongs to his organisation and is marked for deletion (GET).
- The Organisation 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 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.