Extension:WhitelistedNamespaces

What can this extension do?
For wikis that choose to restrict pages that anonymous users can see, this extension provides the capability of whitelisting an entire namespace or array of namespaces.

This extension will work in conjunction with specific pages that have been whitelisted using $wgWhitelistRead

Compatibility

 * MediaWiki version 1.11 and higher

Note: This extension utilizes the 'UserGetRights' hook, which was first implemented in MediaWiki version 1.11.

Installation & Setup / Changes to LocalSettings.php
To install this extension: Set $wgWhitelistedNamespaces to an array of namespace indices that you want to whitelist. For example, if you want anonymous visitors to be able to see all pages in the main namespace, but not be able to read any other pages, then insert the following into LocalSettings.php:
 * Save the code below in a file called "WhitelistedNamespaces.php" and place this file in the extensions folder of your MediaWiki installation.
 * Insert the following into your LocalSettings.php file:

It is not necessary to set $wgGroupPermissions['*']['read'] = false; in the LocalSettings.php file as this extension will set those permissions during the initialization process; however it is good practice to keep your Group Permissions settings in one place for ease of maintenance. Of course, if you are restricting certain pages to read only access, then it probably makes sense that you turn of creation and editing of pages for anonymous members as well. This extension does not set those group permission settings -- you must include those yourself.