Skip to content
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

Deleting Users may lead to broken references in a lot of documents. #401

Open
dting opened this issue Apr 9, 2016 · 1 comment
Open

Comments

@dting
Copy link
Member

dting commented Apr 9, 2016

Since we use references to the User in a lot of documents. Allowing for destructive deletes of the user will lead to a lot of broken references.

One possible solution is instead of destructively deleting a User, the delete action could delete the User.google object, unset the User.assignment and set the User.role to deleted. This would effectively remove all access to the app for that User, while maintaining that User document referenced by other documents. This also allows a new User to be created by that google account for future access. It will be a new User with a different User._id.

@dting
Copy link
Member Author

dting commented Apr 9, 2016

This type of delete would require a couple updates to the User api route that filters out deleted Users when listing all Users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant