You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement functionality that allows a super admin to permanently delete a user's account from the system. This feature should ensure that user data is completely removed and cannot be recovered.
Acceptance Criteria
API Endpoint Implementation
The endpoint should be accessible at /api/v1/users/:id.
The endpoint should accept HTTP DELETE requests.
The endpoint should be protected with authentication and authorization middleware to ensure only super admins can delete a user.
Authorization
Only users with the super admin role should have permission to use this endpoint.
The endpoint should validate the requesting user's role and reject requests if the user is not a super admin.
Data Deletion
The user's account, including associated data (e.g., user profile, related records), should be permanently deleted from the database.
Ensure that all related data is also removed to prevent orphaned records.
Response
On success: The API should return a 200 OK status code with a success message.
On failure: The API should return a 403 Forbidden status code if the user is not authorized, or a 500 Internal Server Error status code for unexpected errors.
Description
Implement functionality that allows a super admin to permanently delete a user's account from the system. This feature should ensure that user data is completely removed and cannot be recovered.
Acceptance Criteria
API Endpoint Implementation
/api/v1/users/:id
.Authorization
Data Deletion
Response
200 OK
status code with a success message.403 Forbidden
status code if the user is not authorized, or a500 Internal Server Error
status code for unexpected errors.Request Example
Successful Response Example
Error Response Example
or
Purpose
Enable super admins to permanently delete user accounts, ensuring that all associated data is also removed from the system.
Requirements
Expected Outcome
Super admins can permanently delete user accounts through the API, with all associated data being completely removed.
Status Codes
Testing
The text was updated successfully, but these errors were encountered: