bridge-in-tech-backend
bridge-in-tech-backend copied to clipboard
Development: Delete user profile | CROSS-PROJECT ISSUE
Is your feature request related to a problem? Please describe. I need to have the ability to delete a profile on BIT. For this, the API on the backend should be available.
Describe the solution you'd like Create an API for user profile deletion for the BIT backend. The API would take user id or information as input and delete the profile information with the appropriate response.. Majorly, 2 outcomes are possible: Successful (200 OK), or Unsuccessful (40x) (x represents one of the error codes like 400, 403, etc.), Not found (404), 500 (internal server error)
The response should be the user id that was deleted or a failure message with why the user was not deleted.
hey @mtreacy002 Can I take this up?
Pinging again @mtreacy002 , @ramitsawhney27
Sorry @decon-harsh for the delay in the response. Can I please ask what your approach is for this task? Hard delete or soft delete? Can you discuss the pros and cons in regard to the two options?
The task itself is a cross project issue with the Mentorship System. Are you aware of how the Mentorship System delete feature works?
I initially want to left this feature till the end until we've got mentorship relations features covered. This is because if we use hard delete we have to remove all the record of that user from the system (which will include their mentorship relation). But I guess, we can work on what we have now (profile) and expand the logic later once the mentorship relations feature is completed.
The initial discussion on hard vs soft delete can be seen here. Let me know what you think.
@mtreacy002 I think, we can do both Deactivate or Delete like other companies (Facebook, Instagram). This will solve both problems. If a user wants to completely delete his/her information from this website he will choose the delete option, but if they wish to come back in the future and take a break for now they will choose to deactivate (soft delete) in that case we can remove their profile available for the mentorship program moreover when they log in again they will have to confirm email again.
Currently, in my local, I made delete_request() which makes a delete request to ms backend server and I believe since the user extension model is on delete cascade it makes a hard delete. Let me know what you think.
@decon-harsh , currently at Mentorship System, the Delete account
feature is made hidden to the user (check the mentorship android issue 1019). The impact of this to BIT is that it is unlikely for BIT to have a Delete account
feature since we can't function separately from MS (MS has the main role of managing users in BIT-MS integration). Only once MS allowing user to delete/deactivate their account, we can follow with the same manner to the user's relevant records on the BIT side.
At some stage in th near future, we do need to make decision on how we're going to implement Delete account
on MS (which will affect BIT project) since once the MS app in production (live), we will have a growing user base and in no time will have to face the issue (Delete/Deactivate
user account). cc @isabelcosta