Page MenuHomePhabricator

Preference "Allow emails from brand-new users" can be changed locally even when global and with "set a local exception" off
Closed, ResolvedPublic

Description

I am not sure if this is a bug that everyone will encounter, or it is a deliberate design. I am putting it here.

Steps to reproduce:

  1. Go to your preference page and go to your global preference
  2. Mark this specific option as global: "Allow emails from brand-new users"
  3. Close your webpage, and go to your preference page again
  4. Normally, when an option is marked as global, you can't change it anymore unless you checked "Set a local exception for this global preference". But for this particular option, you can change it.

Screen Shot 2021-01-18 at 10.16.03 PM.png (898×1 px, 165 KB)

Event Timeline

Aklapper renamed this task from Even if set as global and not checking "set a local exception", a certain preference can still be changed to Even if set as global and not checking "set a local exception", "Allow emails from brand-new users" preference can still be locally changed.Jan 18 2021, 5:27 PM

I will test this after patch of T279256 get deployed.

Change 682214 had a related patch set uploaded (by Func; author: Func):

[mediawiki/core@master] Hide new users checkbox of Special:Preference instead of disable it

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

Change 682303 had a related patch set uploaded (by Func; author: Func):

[mediawiki/core@master] Add support for conditional disable fields in HTMLForm

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

Change 683142 had a related patch set uploaded (by Func; author: Func):

[mediawiki/extensions/GlobalPreferences@master] Use native method to disable new users checkbox

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

Shouldn't merge into T286271, this is another bug.

Change 682214 had a related patch set uploaded (by Func; author: Func):

[mediawiki/core@master] Use native method to disable new users checkbox in Special:Preferences

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

Change 682303 had a related patch set uploaded (by Func; author: Func):

[mediawiki/core@master] Add support for conditional disable fields in HTMLForm

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

Change 683142 had a related patch set uploaded (by Func; author: Func):

[mediawiki/extensions/GlobalPreferences@master] Use native method to disable checkboxes conditionally

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

Change 683142 had a related patch set uploaded (by Func; author: Func):

[mediawiki/extensions/GlobalPreferences@master] Use native method to disable checkboxes conditionally

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

QA Notes:
You can follow the reproduction steps in the description, and test on beta.

Where it says "your preference page" it is referring to https://en.wikipedia.beta.wmflabs.org/wiki/Special:Preferences.

Where it says "global preference" it is referring to https://en.wikipedia.beta.wmflabs.org/wiki/Special:GlobalPreferences.

Change 682303 merged by jenkins-bot:

[mediawiki/core@master] Add support for conditional disable fields in HTMLForm

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

Change 682214 merged by jenkins-bot:

[mediawiki/core@master] Use native method to disable new users checkbox in Special:Preferences

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

Krinkle renamed this task from Even if set as global and not checking "set a local exception", "Allow emails from brand-new users" preference can still be locally changed to Preference "Allow emails from brand-new users" can be changed locally even when global and with "set a local exception" off.Dec 14 2021, 12:30 AM

Change 683142 merged by jenkins-bot:

[mediawiki/extensions/GlobalPreferences@master] Use native method to disable checkboxes conditionally

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

On https://test.wikipedia.org I enabled all user options as global.

In Special:Preferences, all the options I had made global were disabled (with the exception of the Beta features, see T298680).

However:

  • I only tested one wiki. Each wiki has a slightly different set of user options. It is possible that there are bugs in other user options which I did not test.
  • I only tested on one browser (Firefox).
  • GlobalPreferences can be quite buggy. I would not bet against there being other bugs I have missed.

Test environment: https://test.wikipedia.org/ GlobalPreferences 0.1.2 (c91eb42) 15:24, 9 December 2021.
Test browser: Firefox 78