Page MenuHomePhabricator

Allow extensions to register global preferences without needing a config change
Closed, ResolvedPublicFeature

Description

Feature summary (what you would like to be able to do and where):

I am building a preference which shouldn't allow local exceptions. I can currently achieve this by using the GlobalPreferencesAutoPrefs configuration variable, however I don't want this to be configurable. It is proposed that we make use of extension attributes to allow extensions defining preferences to also register them as automatically global.

For example I would add this to my extension.json

	"attributes": {
		"GlobalPreferences": {
			"AutoPrefs": [
				"mypref"
			]
		}
	},

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):

  • Preferences which should never have local exceptions

Benefits (why should this be implemented?):

  • For preferences that should never have local exceptions it is safer to avoid use of configuration.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change #1254993 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/GlobalPreferences@master] Allow auto globals to be set via extension attributes

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

Reedy renamed this task from Allow extensions to register global preferences without needing a config change. to Allow extensions to register global preferences without needing a config change.Mar 19 2026, 10:53 AM
Reedy updated the task description. (Show Details)

Change #1254993 merged by jenkins-bot:

[mediawiki/extensions/GlobalPreferences@master] Allow auto globals to be set via extension attributes

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