Monday, May 21, 2007

Setting up MediaWiki

A default install of MediaWiki will allow anyone to read and edit.
Adding these lines into LocalSettings.php will allow only logged in users to read/edit:

$wgGroupPermissions['*' ]['read'] = false;
$wgGroupPermissions['*' ]['edit'] = false;
$wgGroupPermissions['*' ]['createpage'] = false;
$wgGroupPermissions['*' ]['createtalk'] = false;


Furthermore, adding the following will allow only sysop to create accounts:

$wgGroupPermissions['*' ]['createaccount'] = false;
$wgGroupPermissions['sysop']['createaccount'] = true;
$wgWhitelistRead = array( "Main Page", "Special:Userlogin", "-", "MediaWiki:Monobook.css" );


See http://ericsantiago.typepad.com/eric_santiago/mediawiki/index.html

No comments: