Extension:AdminWhiteList
From MediaWiki.org
|
AdminWhiteList Release status: stable |
|||
|---|---|---|---|
| Implementation | User access, User rights | ||
| Description | This extension adds the user to the groups sysop and bureaucrat when the user is logged in. Its useful for a LDAP wiki based authentication and you need to define which users must be sysop and bureaucrat. Array defined in LocalSettings. | ||
| Author(s) | Nino Dafonte (nino_dafonteTalk) | ||
| MediaWiki | working in MW 1.12. Backwards compatibility not tested. | ||
| License | No license specified | ||
| Download | the code | ||
|
|||
|
|||
[edit] Description
This extension is useful to add sysop and bureaucrat permissions to the user logged in when you are in an external authentication wiki based, like LDAP.
You must define an array (LocalSettings) with the name of the users you want to be included in sysop and bureaucrat groups. When the user logs in, the extension compares the username with the names in the array and, if the username is in the array, the user is automatically added to both groups.
[edit] Usage
- Copy the code below to a file named "AdminWhiteList.php" into the extension folder.
- Add the include for this extension in LocalSettings.php
require_once( "$IP/extensions/AdminWhiteList.php" );
- Add the vars $wgAdminWhiteList and $wgAdminWhiteListDebug to your LocalSettings.php
$wgAdminWhiteList = array("username1", "username2", "username3"); $wgAdminWhiteListDebug = false; // true, false. true writes its actions on screen.
- Ready to go.
[edit] Code
Check the code

