Wiki – How do I allow only logged-in users to edit?
# Disable reading by anonymous users
$wgGroupPermissions[‘*’][‘read’] = false;
# But allow them to read e.g., these pages:
$wgWhitelistRead = array ( “Main Page”, “Special:Userlogin”, “Wikipedia:Help”);
# Disable anonymous editing
$wgGroupPermissions[‘*’][‘edit’] = false;
# Prevent new user registrations except by sysops
$wgGroupPermissions[‘*’][‘createaccount’] = false;
From :
http://www.mediawiki.org/wiki/Manual:User_rights