MediaWiki:Setting up
From Linux How-To Repository
Source: http://www.thejackol.com/2007/02/16/disable-anonymous-editing-in-mediawiki/
If you want to disable Anonymous editing in MediaWiki, here is one way to do it:
Edit LocalSettings.php and add the following setting:
$wgDisableAnonEdit = true;
Edit includes/SkinTemplate.php, find $fname-edit and change the code to look like this (i.e., basically wrap the following code between the wfProfileIn() and wfProfileOut() functions):
wfProfileIn( "$fname-edit" ); global $wgDisableAnonEdit; if ( $wgUser->mId || !$wgDisableAnonEdit) { // Leave this as is } wfProfileOut( "$fname-edit" );
Next, you may want to disable the [Edit] links on sections. To do this, open includes/Skin.php and search for editsection. You will see something like:
if (!$wgUser->getOption( 'editsection' ) ) {
Change that to:
global $wgDisableAnonEdit; if (!$wgUser->getOption( 'editsection' ) || !$wgDisableAnonEdit ) {
Section editing is now blocked for Anonymous users.
