devinshende / challenge-tracker

Website to track challenge times for obstacles at nwninjapark in springfield, OR
https://ninjapark-tracker.herokuapp.com
1 stars 0 forks source link

When a user is deleted, delete their profile pic #45

Closed devinshende closed 3 years ago

devinshende commented 4 years ago

Flask admin doesn't realize that users who have uploaded a profile pic have it stored in _static/profilepics but when they are deleted through flask_admin, we need to delete their profile pic in that folder as well. This could cause issues like the wrong person having the wrong profile pic, for example if the final user is deleted but their profile pic is not, then the next user to sign up will have their profile pic as their user_ids match

devinshende commented 4 years ago

Also, it is important to keep in mind that when developing and running the code locally, any profile pics uploaded could affect real users in the deployed version 😨

devinshende commented 4 years ago

For that reason we made it so you can't upload profile pics in 'dev' mode