riparias / gbif-alert

GBIF Alert is a GBIF occurrence based alert system.
https://gbif-alert-demo.thebinaryforest.net/
MIT License
8 stars 2 forks source link

Deleting an account #179

Closed damianooldoni closed 1 year ago

damianooldoni commented 2 years ago

As I had too many accounts on dev, mainly created for live demonstrations (see #178 ), I would like to delete them. However, I don't think it's possible. I think the users should be allowed to delete their own account, if they wish to do so. What do you think, @niconoe? Front-end speaking, I think a red button in My Profile page would be enough. And the typical "Are you sure?" question when the user clicks on it.

niconoe commented 2 years ago

Indeed, it would be good to provide such a feature to the users.

In the current state of affairs, that can be done by any Admin in the admin section. Is there an account on dev I can delete for you?

damianooldoni commented 2 years ago

You can delete all of them. I will make a new one afterwards. Thanks.

damianooldoni commented 2 years ago

Actually I can delete them as I have admin rights, indeed 👍

damianooldoni commented 2 years ago

Indeed, problems as you mentioned in #180

niconoe commented 2 years ago

I've deleted your accounts, @damianooldoni. Tell me when you have created a new one (so I can promote you to admin)

damianooldoni commented 2 years ago

Thanks @niconoe. I have just now created a new account on dev. username: damianooldoni email: damiano.oldoni@inbo.be

I will use this as main account, so please provide it admin rights. Thanks.

niconoe commented 2 years ago

Done!

niconoe commented 1 year ago

Update: This is now implemented in the user_can_delete_their_account branch. I also made some changes to the comments system so the user's comments are "emptied" rather than deleted. When a user delete its account, its comments lose their content and author, but still appear as a deleted entry on the observation page (this is to avoid confusing conversations in case users make longish exchanges about an observation).

This feature has low-level (models) tests, but still lacks high-level testing:

niconoe commented 1 year ago

Hey @damianooldoni : this is now implemented, and the result is visible on https://dev-alert.riparias.be (there's a new button on the my profile page). Can you have a look?

damianooldoni commented 1 year ago

Great! It works. I got a new issue I think: I made a test account (just for this issue) using the very same email address of another existing account. After deletion of the test account I clicked on "Lost password" and so tried to log in back. What I did is that I got an email reminding me that the account is called "damianooldoni":


You're receiving this email because you requested a password reset for your user account at dev-alert.riparias.be.

Please go to the following page and choose a new password:

https://dev-alert.riparias.be/accounts/reset/xxx/xxxxxxxxxx

Your username, in case you’ve forgotten: damianooldoni

Thanks for using our site!

The dev-alert.riparias.be team