Page MenuHomePhabricator

Prevent GlobalWatchlist from setting preferences for temporary accounts
Closed, ResolvedPublic3 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

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!)

AGueyte set the point value for this task to 3.Jun 6 2023, 5:58 PM

Change 929345 had a related patch set uploaded (by AGueyte; author: AGueyte):

[mediawiki/extensions/GlobalWatchlist@master] Prevent Temp Users from saving UserOptions preferences

https://gerrit.wikimedia.org/r/929345

AGueyte changed the task status from Open to In Progress.Jun 12 2023, 2:07 PM

@AGueyte: Please don't remove people's project tags (or explain why). Thanks!

Change 929345 merged by jenkins-bot:

[mediawiki/extensions/GlobalWatchlist@master] Prevent Temp Users from saving UserOptions preferences

https://gerrit.wikimedia.org/r/929345

@AGueyte Invalid exception error before the patch and now you must be logged in after the patch as a temp user. I will move this to Done. Thanks!

Before Patch

T337778_IPMasking_GlobalWatchlistSettings_Pre.png (890×3 px, 409 KB)

Post Patch

T337778_IPMasking_GlobalWatchlistSettings_Post.png (433×3 px, 119 KB)