Documentation
- https://meta.wikimedia.org/wiki/Community_health_initiative/Allow_users_to_restrict_which_user_groups_can_send_them_direct_emails
- https://en.wikipedia.org/wiki/Wikipedia:Community_health_initiative_on_English_Wikipedia/Allow_users_to_restrict_which_user_groups_can_send_them_direct_emails
Background & Current Functionality
Wikimedia accounts use unified login across all wikis. If a user never visits a wiki, then they do not technically have an account created, therefore the 'Email this user' link is not visible on their userpage and Special:EmailUser will not accept their username as valid. However, when a user visits a page on another Wikimedia wiki while logged-in (via on-wiki or off-wiki link, Google search, or direct navigation) the system 'creates' their account on that wiki, and they can therefore be contacted via email.
For example:
- User:Apples created their account on English Wikipedia, has confirmed their email address and uses the default user preferences. They have never visited Japanese Wikipedia (intentionally or unintentionally.) If User:Bananas (a user with a confirmed email address) visits Special:EmailUser/Apples on Japanese Wikipedia, the website will show the account as invalid and Bananas will not be able to email Apples.
- User:Carrots created their account on English Wikipedia, has confirmed their email address and uses the default user preferences. While logged in, they followed a link from a Google search to Wikiquote. If User:Durian visits Special:EmailUser/Carrots on Wikiquote, the website will show the account as valid and Durian will be able to email Carrots.
Acceptance Criteria
- If a user has never edited or triggered a logged action AND they did not create their account on that wiki, they should not be able receive Special:EmailUser emails sent from that wiki.
- Users in the groups bureaucrat, steward, wmf-supportsafety, and global-renamer should still have the ability to send email to these users.
- This should be a new right assigned to these groups.
- If a user is not in the specified groups, the 'Email this user' link in the side navigation of a user page should not appear
- If a user is not in the specified groups, navigating directly to Special:EmailUser/Foobar should display an error message
- If the user does not have a confirmed email or is anonymous: display the standard "No send address" error page
- If the user has a confirmed email address and is not a bcrat/steward/wmf-susa/global-renamed: display a new error message in this style.