4.21. Organisation Administrator - Delete organisation users
| Id | 4.21. |
| Description | As an Organisation Administrator, I want to be able to mark users of my organisation for deletion, So that I can ensure that users that do no longer require access to the System have their access revoked. |
| Priority | Medium |
| Actors | Organisation Administrator |
| API Calls |
PUT /admin/api-users/<user-id> DELETE /admin/api-users/<user-id> |
| Linked Processes | |
| Status | Implemented |
Preconditions
- The User must be authenticated and have the Organisation Administrator role.
- The user to be deleted must exist on the platform and belong to the Organisation Administrator’s organisation
Postconditions
- The user is marked as “inactive”.
- The user is disabled and can no longer login or use the system in any way.
- After a period of X days (configurable by the Application Administrator), all personal data of that user is deleted (name, lastname, email) and replaced by generic data.
- IMPORTANT: No data entries linked to the vertical cabling datasets that are linked to that user are deleted! The organisation information, to which that user was linked is kept.
Main flow
- The Organisation Administrator retrieves a list of existing users that belong to his organisation with their details and roles (GET).
- The Organisation Administrator uses an API to modify the existing user and the flag “active=false” (PUT/PATCH).
- The system validates the input data.
- The system saves the changes and updates the user list.
- After the pre-defined period the system deletes all personal data linked to the inactive user.
Exceptions
[400 Bad Request] Invalid input:
If mandatory fields are missing or invalid, the system returns an error message.
[403 Forbidden] User cannot delete himself
If the Organisation Administrator attempts to delete his own user, an error will be returned.
[404 Not found] User not found
If the Organisation Administrator attempts to modify a user that does not exist or does not belong to his organisation, 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.