MediaWikiExtension GroupPermissionsManager2.00
Mediawiki Extension: Group Permissions Manager
Sometimes you as a Mediawiki administrator might feel the need to add or remove a group, or edit a groups rights. Unfortunately, there is no such function in the MediaWiki software itself, you'd have to edit the LocalSettings.php file somehow. Bogus! But fortunately, there now exists an extension that adds this functionality. Most excellent!
Adding the extension
First, download the three files that make up the GroupPermissionsManager extension from here: Mediawiki Extension:Group Permissions Manager. The files are named
- GPManager.php
- GPManager_body.php
- GPManager.i18n.php
These three files are to be placed in a subdirectory GPManager of the extension directory of your Debian MediaWiki installation, presumably /usr/share/mediawiki-extensions. As of the writing of this page, the files are not offered as downloads, you'll have to open an editor and cut & paste the texts. If you do this as root, the files will automatically have the right owner and permissions, but else, you'll have to make sure these three files are owned by root, and cannot be edited by anyone else. As root:
cd /usr/share/mediawiki-extensions chown root:root GPManager cd GPManager chown root:root GPManager* chmod 644 GPManager*
Next, we have to make a small alteration to /usr/share/mediawiki/includes/GlobalFunctions.php because there's a bug in MediaWiki 1.12, and that's the version that Lenny uses. The alteration is described in a patch prescription on the MediaWiki site, but in essence we add a line after line number 422: the line beginning with "wfRunHooks":
function wfMsgGetKey( $key, $useDB, $forContent = false, $transform = true ) { global $wgParser, $wgContLang, $wgMessageCache, $wgLang; wfRunHooks( 'NormalizeMessageKey', array( &$key, &$useDB, &$langCode, &$transform ) );
Next, we mark the extension available to MediaWiki:
cd /etc/mediawiki-extensions/extensions-available ln -s /usr/share/mediawiki-extensions/GPManager/GPManager.php
Then, enable the extension (either by using the mwenext command, or by this):
cd /etc/mediawiki-extensions/extensions-enabled ln -s ../extensions-available/GPManager.php
Finally, we create a directory @@@ grant the permission to @@@ This adds the @@ capability to the Mediawiki administrator group "bureaucrat", of which WikiAdmin is a member - and presumably you too.
Using the extension
To manage group permissions, you need the following:
- your MediaWiki user account needs to be in a MediaWiki group that has been granted the right to use PasswordReset, e.g. bureaucrat as depicted above
- you must be logged in with that MediaWiki account
- you need to know d
In the left navigation area, click on Special pages; scroll down to the section Restricted special pages, you should see an entry @@. Click it to enter the @@ special page. @@@