Manual talk:Setting user groups in MediaWiki

Ok so far - but how do I set the rights for unregistered users. I do not want unregistered users to edit pages. Does sb know how?

Edit LocalSettings.php and look for the lines. You can add them if they are not already there. To only allow logged in edits change them to $wgWhitelistEdit = true; $wgWhitelistRead = false; $wgWhitelistAccount = array ( "user" => 1, "sysop" => 1, "developer" => 1 );
 * 1) $wgWhitelistEdit = false;
 * 2) $wgWhitelistRead = false;
 * 3) $wgWhitelistAccount = array ( "user" => 1, "sysop" => 1, "developer" => 1 );

That should work but I've never tried it myself.

This is not really in the wiki spirit ;-) - Tobin Richard

Thank you a lot! Yeah you're right, but my wiki will be used in a school... there are many people who would just love to see our school-wiki project collapsing.

wgWhitelistRead and categories
Karin van den Berg

I have set up a wiki to try it out and to keep track of all the documenting I do for my graduation project. So not a wiki in the wiki spirit, I'd rather not have my work plagiarized before I publish my thesis, so I tried to restrict access using $wgWhitelistRead = array ("Main Page", "Special:Userlogin", "Wikipedia:Help"); However, I noticed that using this method the subcategories and articles in a category that is linked on the mainpage are still shown (not the page content of the category though). But because I have some article names and such in the subcategories and the main category name is easily guessed, I wanted to restrict this too. I think that it would be logical that if you restrict access to certain pages, the categories that are restricted don't show their subcategories and articles.

Anyway, I edited includes/Parser.php as follows:

line 482 added: # Don't show subcategories and articles when category not in whitelist if ((!is_array( $wgWhitelistRead ) || (in_array( $name, $wgWhitelistRead) || 0 != $wgUser->getID )))

Before: {			# Don't show subcategories section if there are none. if ( count ( $children ) > 0 ) The End parenthesis ( i.e. } ) on line 605 before return $r

However, the $wgWhilelistRead array is not readable from this file apparently (making it global in this function doesn't help), so I had to copy the line from localsettings.php to above line 482 as stated here. Anyone have any idea how I can include the whitelist array without breaking something or going against mediawiki developer guidelines or something?

Adding a Sysop
Hi! Please help me. My web host installed MediaWiki for me, without creating a sysop. i tried to set the user rights of one of the usernames to 'sysop' according to the instructions on the content page, but without success. What i did was go to phpMyAdmin > the MediaWiki db and then run the SQL UPDATE instruction given on the content page. What did i do wrong or miss out?