Extension:Access Control Panel
|
Access Control Panel Release status: beta |
|||
|---|---|---|---|
| Implementation | Special page | ||
| Description | Control access rights of custom defined groups | ||
| Author(s) | University of Macau (Aleksandar Bojinovic, Peter Kin-Fong Fong) (umdaccTalk) | ||
| Last version | 1.0.1 (10/12/2011) | ||
| MediaWiki | 1.15+ | ||
| PHP | 5.0 | ||
| License | Educational Community License 2.0 | ||
| Download | see Download section | ||
|
|||
|
Check usage (experimental) |
|||
Contents |
[edit] What can this extension do?
The Access Control Panel extension provides a simple interface to setup group-based access control. Groups can be created or deleted, members can be added into or removed from groups, privileges can be granted or revoked, all in a single control page.
While a group is created, an associated namespace is also created. Members of a group can view and edit their group's namespace. If access privilege is granted, they can also view and/or edit other group's namespace.
This extension is a simple front-end to Extension:Lockdown, so Lockdown extension should be installed first before installing this extension.
[edit] Usage
The Access Control Panel extension is a MediaWiki Special Page. Only users in 'Teacher' group can access this special page. There are two ways to invoke this special page:
- Directly navigate to the page 'Special:AccessControlPanel'.
- Enter the 'Special Pages' page and click on the Access Control Panel special page.
The following shows the access control panel interface:
[edit] Download
Download the Access Control Panel extension archive file.
[edit] Installation
[edit] Requirements
The AccessControlPanel extension has the following requirements (besides the MediaWiki and PHP versions specified in the extension box):
- MySQL database servers are required; PostgreSQL and SQLite are not supported.
- MediaWiki database administrator access (or other database role that has privileges for creating SQL functions).
- Extension:Lockdown should be installed first. Please refer to Installing section for instruction.
[edit] Step by Step Instruction
Step 1: (optional) You may want to disallow anonymous users to read and edit your wiki. If you are using MediaWiki version 1.17 or later and have set your wiki to "Private wiki" during installation, then your wiki already disallows anonymous reading, and you don't need to do anything in this step. Otherwise, add the following lines to the bottom of your LocalSettings.php file.
$wgGroupPermissions['*']['createaccount'] = false; $wgGroupPermissions['*']['edit'] = false; $wgGroupPermissions['*']['read'] = false; # Allow anonymous user to read the Main Page and login page $wgWhitelistRead = array( ":Main Page", "Special:Userlogin" );
Step 2: Download the archive file from the link above.
Step 3: Extract the downloaded archive to the extensions directory of your MediaWiki installation. For example (replace with the actual path to your MediaWiki installation):
unzip AccessControlPanel-1.0.1.zip -d /path/to/mediawiki/extensions
Step 4: Add the following line to the bottom of LocalSettings.php (before the trailing ?>, if it is present):
require_once("$IP/extensions/UMEduWiki/AccessControlPanel/AccessControlPanel.php");
(optional) By default, only users in group named 'Teacher' can access the access control panel. If you would like to name this group something else than 'Teacher', include the following line after the above require_once line (as you want to name the privileged group 'ControlGroup'):
$wgAccessControlPanelAllowedGroup = 'ControlGroup';
Finally, add the following two lines after the above:
$wgGroupPermissions[$wgAccessControlPanelAllowedGroup]['read'] = true; $wgGroupPermissions[$wgAccessControlPanelAllowedGroup]['edit'] = true;
Step 5: Update the MediaWiki database by executing the update.php maintenance script.
php /path/to/mediawiki/maintenance/update.php
Step 6: As a user of the privileged group (either the default 'Teacher' group, or whatever group name you defined in step 4), visit the page 'Special:AccessControlPanel' in your MediaWiki installation. If everything went well you should see the Access Control Panel special page. In the first panel ("Group management"), add a group with the name of the privileged group (again, either the default 'Teacher' group, or whatever group name you defined in step 4).