Page MenuHomePhabricator

Prevent Echo Extension from setting preferences for temporary accounts
Closed, ResolvedPublic

Description

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

includes/Api/ApiEchoMute.php
includes/EmailBatch.php
includes/Special/SpecialDisplayNotificationsConfiguration.php
tests/phpunit/DiscussionParserTest.php

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

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.

Event Timeline

Aklapper removed a subscriber: AndrewGarrett.

@AGueyte: Assuming this task is about the Notifications code project, thus adding that project tag so people can also find this task when searching via projects or looking at workboards. Please set appropriate project tags when possible. Thanks!

AGueyte claimed this task.