Extension:LockDownEnglishPages
|
|
If you need per-page or partial page access restrictions, you are advised to install an appropriate content management package. MediaWiki was not written to provide per-page access restrictions, and almost all hacks or patches promising to add them will likely have flaws somewhere, which could lead to exposure of confidential data. We are not responsible for anything being leaked, leading to loss of funds or one's job. For further details, see Security issues with authorization extensions |
|
Lock Down English Pages Release status: beta |
|||
|---|---|---|---|
| Implementation | other (invalid type) | ||
| Description | Prevents non-staff users from editing the English interface messages | ||
| Author(s) | Jack Phoenix | ||
| Last version | 0.1 (6 July 2011) | ||
| MediaWiki | 1.6.0+ | ||
| License | Public domain | ||
| Download |
Download snapshot (Git master)
Git [?]: repo summary • tree • code changes SVN [?]: checkout-url • tree • code changes |
||
|
|||
|
Check usage (experimental) |
|||
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 preventing 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.
[edit] Installation
- Download the source code, either via the extension distributor or SVN and place it in $IP/extensions/LockDownEnglishPages/
- Add the line
into the wiki's LocalSettings.phprequire_once("$IP/extensions/LockDownEnglishPages/LockDownEnglishPages.php");
- Installation can now be verified through the wiki's Special:Version
[edit] 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.
[edit] 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.
