Page MenuHomePhabricator

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

https://codesearch.wmcloud.org/deployed/?q=UserOptionsManager#mediawiki/extensions/WikimediaMessages

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 changed the task status from Open to In Progress.Jun 8 2023, 2:22 PM
AGueyte changed the task status from In Progress to Open.
AGueyte claimed this task.

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

[mediawiki/extensions/WikimediaMessages@master] prevent temp users from seeing RCFilters guided tours

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

AGueyte changed the task status from Open to In Progress.Jun 8 2023, 3:37 PM

Change 927779 merged by jenkins-bot:

[mediawiki/extensions/WikimediaMessages@master] prevent temp users from seeing RCFilters guided tours

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

dom_walden subscribed.

I went to Special:RecentChanges on different wikis as an anonymous, temporary and named user, to see whether or not the RecentChanges Filters tour showed.

WikiAnonTempNamed
dewiki betaNo tourNo tourTour
enwiki betaNo tourNo tour(!)Tour
testwikiNo tourN/ATour

(To test whether named users saw the tour, I first had to reset my preferences.)

For the "temp" user on enwiki beta, I made an edit on dewiki beta so it would autocreate a temp account. Then I went to enwiki, where CA logged me in as the temp user. I was expecting the temporary user on enwiki to be treated as a named user, and so be shown the tour. However, this did not happen.