mysociety / alaveteli

Provide a Freedom of Information request system for your jurisdiction
https://alaveteli.org
Other
387 stars 195 forks source link

Replace close and anonymise with independent account closure actions #7646

Closed garethrees closed 1 year ago

garethrees commented 1 year ago

Requires https://github.com/mysociety/alaveteli/pull/7611.

Instead of a single "close and anonymise" action, we should make the set of actions more composable. For example, a user may only want their account closed rather than anonymised.

Screenshot 2023-03-17 at 14 57 22

Each option should document what the action does inline in the UI. Might want to fold the specifics in a <details> tag if it starts getting too long.

For close and anonymise we currently state:

This is disabled for banned users as the email address must be preserved to enforce the ban. First remove the ban text and then close and anonymise the account.

I think this is still true. We should allow the #close and #anonymise options when the user is banned, but disable #erase, as that's the one that will now remove the account email address.

When an account gets closed, we should ensure that no email gets sent to it (https://github.com/mysociety/alaveteli/issues/4603 is likely relevant here). We'll need to be careful about this becoming a rabbit hole. If it starts getting complicated, the easiest solution might be a callback along the lines of before_action { return false if @recipient.closed? } in the mailer methods.

Note that https://github.com/mysociety/alaveteli/issues/5052#issuecomment-1345525599 still requires the User#close_and_anonymise method – this issue is just to replace the admin UI options.

JenMysoc commented 1 year ago

Next step