FEATURE: improve email change workflow (PR #8377)

  • Show old and new email address during the process
  • Ensure correct user is logged on when attempting to make email changes
  • Support reloading a page during the email reset process without resubmit of form
  • Clean up tests

internal refactor of single action into 4 distinct actions that are simpler to reason about.

This also removes the step that logs on an account after you confirm an email change, since it is no longer needed which leaves us with safer internals.

This left me no choice but to amend translations cause the old route was removed.

GitHub

Thanks for contributing this pull request! Could you please sign our CLA so we can review it? http://www.discourse.org/cla

@eviltrout this needs some careful review… don’t merge quite yet

Very happy with the end result here, but it touches a lot of stuff and I needed to fuss with migrations

I needed to fuss with translations

I’d suggest adding a DB migration to delete or modify translation overrides when they contain the old authorize-email route.

@SamSaffron in the future you can create a Draft PR. It makes it unmergeable until you mark it as finished.

    if (!@token&.user || !@change_request)

No need to check for token if you use the & operator.

So far so good!

This path (/) is not subfolder aware.

Can we use CSS instead of multiple <br> tags?

This is now merged in. @gschlager I am option to play this by ear regarding the migration, it just feels odd to carry a once off or a migration here for this enormous edge case

@eviltrout tried to address all your comments, thanks for the review!

@SamSaffron why did you close this and make a new commit? This means that github loses the linking between the PR and the commit. Also I can’t see what changed after my suggestions!

Thanks for contributing this pull request! Could you please sign our CLA so we can review it? http://www.discourse.org/cla

Apologies @eviltrout I just force pushed here so you can see the full context … but merging ain’t going to fly since it is already merged

was being lazy cause it avoided me needing to force push to my repo.