-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Canceling an account doesn't work #68
Comments
I took a look at this. I think the wrong redirection is an easy fix but we have a problem with associations between users and messages so right now deleting a user throws an error because of InvalidForeignKey error. |
I think this and #52 fundamentally stem from not having a consistent methodology on what to do with dangling user keys. Our options here (on a per-foreign key basis) are as follows:
We are going to need one of the last two solutions for the case where a driver deletes their account, as the riders on their rides should still be able to see that they took a ride. If we decide that riders should still be able to see who they took rides with, we have to implement soft deletes (or denormalize our historical records, but ick and that's hard in rails). My guess is that soft deletes, even if we get rid of all identifying information, will be probably easier to implement than a null user as it does not seem to stray as far from the well beaten path. However, even if we delete all the columns from deleted users except their ride id, it would still be possible to reconstruct who a rider is if you know a couple rides they took by looking for common ids, which does raise potential data privacy problems. This was a bit of a brain dump, so please bother me if anything doesn't make sense. |
@YourFin I think your comment makes perfect sense. I think the soft delete is the way to go as it will sometimes be important to know which user did something (like posted a message or was a driver). As far as data privacy, I'm sure there is something to be said for that, but at the end of the day this is a social website (users interacting with other users) so there will be some record of users using the site even if we delete everything. I would take the route of Reddit on this, user generated data can be deleted and user references can be deleted, but the fact that they existed can't. Further, in the case of rides, if a driver offers a ride and deletes their account and passengers join it we should allow this ride to exist but remove the driver. Same for passengers: in the case of a canceled account, passengers need to be removed from all rides. |
I prefer deleting the user fully and nullifying or deleting all related models. They only relations that would need to be made optional are the |
Expected action:
When canceling an account on
/users/edit
using the button account should be removed and client should be redirected to home pageActual action:
User isn't removed and client is redirected to
/users
which isn't a real page, resulting in a 404The text was updated successfully, but these errors were encountered: