Page MenuHomePhabricator

Prevent TranslationNotifications from setting preferences for temporary accounts
Closed, ResolvedPublic4 Estimated Story Points

Description

Following T335971, it appears the extension is saving preferences for temporary users.
Update the code to treat temporary users like anon users.

Wherever these do something different based on whether a user is anonymous or registered, they may need updating (including comments).

Tests and comments should also be updated.

Notes
To help with searching:

In PHP preferences are saved via UserOptionsManager::saveOptions
In JS preferences are saved via methods defined on options.js: https://gerrit.wikimedia.org/g/mediawiki/core/+/809d4c9a9dd2cff6321cdae7a41e75b6c362cbbd/resources/src/mediawiki.api/options.js
Code Search: https://codesearch.wmcloud.org/deployed/?q=UserOptionsManager

Event Timeline

(Please add codebase project tags to tasks when possible, so such tasks can be found when looking for open tasks related to that codebase - thanks!)

I see two usages of saveOption in TranslationNotifications. Both of these usages are in maintenance scripts and operate on subscribers who have subscribed to receive notifications which temporary users cannot do.

Hi @abi_ thank you for doing the research.
Then in that case we can close the task.

@AGueyte Reviewing the documentation on Meta-Wiki regarding temporary accounts, I see that temporary accounts cannot log in to their account. The special page from where translators signup (Special:TranslatorSignup) to receive notifications requires that user's log in to access it (See: GitHub code URL). I think this should ensure that temporary users cannot use that page right?

@AGueyte Reviewing the documentation on Meta-Wiki regarding temporary accounts, I see that temporary accounts cannot log in to their account. The special page from where translators signup (Special:TranslatorSignup) to receive notifications requires that user's log in to access it (See: GitHub code URL). I think this should ensure that temporary users cannot use that page right?

This is correct, and testing will still be needed to confirm. Happy to help with this if needed!

I checked translation notification subscribers on MediaWiki and Meta-Wiki, and found that there are no temporary users, so I think the current system is working as expected.