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
Feature: Allow staff to change user emails #7074
Feature: Allow staff to change user emails #7074
Conversation
self.recorded_changes = ActiveSupport::HashWithIndifferentAccess.new( | ||
email: [target.email, nil], | ||
unconfirmed_email: [nil, target.unconfirmed_email] | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be a bit contentious, but essentially in the ActionLog view, you want to see both the current email and what it's been changed to. This isn't captured with target.previous_changes
as we're not updating the email directly, but rather requiring confirmation of the email update.
On https://github.com/tootsuite/mastodon/pull/7074/files#diff-64be43f43a5e15792e0f9d355cecc7a3 — I've not written many tests from scratch before, so let me know if there's something I should do differently. |
Pinging @Gargron for review (perhaps it's an idea to get a "reviewers bot" setup? |
* Update Japanese translations. * Update Japanese translations. * Update Japanese translations. * Update Japanese translations. * Add Japanese translations for #6984, #7040, #7072. Update Japanese translations for privacy policy. * Add Japanese translations for #7032, #7074, #7089. * Proofreading Japanese translations for privacy policy.
* i18n: (zh-CN) #7532 * i18n: (zh-CN) #6984 * i18n: (zh-CN) #7391, #7507 * i18n: (zh-CN) #6998 * i18n: (zh-CN) #7074 * i18n: (zh-CN) #7000, #7032, #7131 (#7032, #7040) * i18n: (zh-CN) #7130, #7188 * i18n: (zh-CN) #6486 * i18n: (zh-CN) #6292 * i18n: (zh-CN) #7347 * i18n: (zh-CN) #6661 * i18n: (zh-CN) #6425 * i18n: (zh-CN) #6597 * i18n: (zh-CN) #6695 * i18n: (zh-CN) #6325 * i18n: (zh-CN) #6460, #7375 * i18n: (zh-CN) #6872 * i18n: (zh-CN) #6818 * i18n: (zh-CN) #7452 * i18n: (zh-CN) #7176 * i18n: (zh-CN) #6460 * i18n: (zh-CN) #7213 * i18n: (zh-CN) #7376 * i18n: (zh-CN) #6556 * i18n: (zh-CN) #6645 * i18n: (zh-CN) #6448 * i18n: (zh-CN) #5303 * i18n: (zh-CN) #7445 * i18n: (zh-CN) Normalization and improvements * i18n: (zh-CN) #7391 * i18n: (zh-CN) #6627 * i18n: (zh-CN) #6956, #7546 * i18n: (zh-CN) #6636 * i18n: (zh-CN) #6610, #6875 * i18n: (zh-CN) #6887 * i18n: (zh-CN) #4514 * i18n: (zh-CN) #6628 * i18n: (zh-CN) #6771 * i18n: (zh-CN) #6772 * i18n: (zh-CN) #7178 * i18n: (zh-CN) #7521 * i18n: (zh-CN) #6570 * i18n: (zh-CN) #6593 * i18n: (zh-CN) #6423 * i18n: (zh-CN) #6157 * i18n: (zh-CN) #7089 * i18n: (zh-CN) #6733 * i18n: (zh-CN) #7072 * i18n: (zh-CN) #6520 * i18n: (zh-CN) Improvment * i18n: (zh-CN) #6631
* Admin: Show unconfirmed email address on account page * Admin: Allow staff to change user email addresses * ActionLog: On change_email, log current email address and new unconfirmed email address Conflicts: - config/locales/en.yml (resolved manually, conflicted with Report UI changes)
Presently on Switter.at, we get a lot of users accidentally signing up with the wrong email address, like, they use
@proton.com
instead of@protonmail.com
which means they never can finish creating their account.This PR implements the ability for a staff member to find a user and change their email address. The reason it does not issue an
email_changed
email is that the current email address is usually invalid and emailing it would decrease your deliverability stats / increase spam score.The change is captured in the audit log, with details:
The view changes are as follows: