Extension:LockDownEnglishPages
![]() | MediaWiki was not designed to support per-page or partial-page access restrictions. If you require this level of control, you are strongly advised to use a content management system that supports it natively.
Patches or third-party extensions claiming to provide access control may contain security flaws, potentially exposing confidential data. Use them at your own risk. Neither the MediaWiki developers nor the Wikimedia Foundation are responsible for any data leaks that may result. This message is added to all extensions of this nature and may not reflect the actual security status of this extension. For more information, see Security issues with authorization extensions . |
![]() Release status: betaCategory:Beta status extensions |
|
---|---|
Implementation | User rightsCategory:User rights extensions |
Description | Prevents non-staff users from editing the English interface messages |
Author(s) | Jack Phoenix |
Latest version | 0.3.0 (2020-07-29) |
MediaWiki | 1.43.3+Category:Extensions with manual MediaWiki version |
License | Public domain |
Download | Category:Extensions in Wikimedia version control |
Example | ShoutWiki's Interface Messages Wiki |
Translate the LockDownEnglishPages extension if it is available at translatewiki.net | |
Issues | Open tasks · Report a bug |
Lock Down English Pages is a MediaWiki extension that prevents users who are not members of the staff group but who have the editinterface user right from editing English interface messages (pages in the MediaWiki namespace that either have the /en suffix or no slash character at all).
This extension was written by Jack Phoenix for ShoutWiki to fix ShoutWiki bug #54.
Installation
- Download and move the extracted
LockDownEnglishPages
folder to yourextensions/
directory.
Developers and code contributors should install the extension from Git instead, using:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/LockDownEnglishPages
- Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'LockDownEnglishPages' );
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Explanation of the logic
The extension checks that:
- the page we're trying to edit is in the NS_MEDIAWIKI namespace
- that we have the 'editinterface' user right (which sysops by default have)
- that we are not a member of the staff group and
- that $action is 'edit'
Then it proceeds to check the current title. If the current title has either /en or alternatively no / at all in its title, editing will be prevented.
Rationale
ShoutWiki's custom extensions and other things are translatable via the Interface Messages Wiki (where the MessageCommons extension is installed). We are rather liberal with the administrator rights over there, but since administrators (by default) have the editinterface user right, they may accidentally mess up the English pages, in case if they forget to add their language's language code to the page URL (i.e. they want to edit MediaWiki:Foo/fr but they accidentally end up editing MediaWiki:Foo, the English message). This extension prevents translators from accidentally messing up the English interface messages by disallowing them to edit those messages.
Category:Extensions by ShoutWiki