Extension talk:Hierarchical Namespace Permissions

User rights
The LocalSettings.php example contains rights (browse, raw, Leave_Comment_Form) not mentioned in Help:User rights. Where can I find the documentation for these rights? ThT 16:00, 27 September 2007 (UTC)
 * The code file actually contains lots of documentation. Jean-Lou Dupont 16:19, 27 September 2007 (UTC)
 * Before asking here I checked the code file as well. I couldn't find definitions of the rights browse, raw, Leave_Comment_Form there. ThT 06:06, 28 September 2007 (UTC)
 * The 'browse' right is one supported through the BizzWiki platform. The 'raw' right is available through RawRight. Jean-Lou Dupont 11:05, 28 September 2007 (UTC)

Only allow registered users access
I seem to be stuck at an dead-end.

I only want registered users to be able to access the wiki I'm building. However, this doesn't seem to allow for it. The only way I become able to log in is by setting the "read" to true. I could create a separate "read" just for NS_SPECIAL, but that give anonymous users access to the SpecialPages, which I don't want.

Do you have a recommendation?

// Implicit group for all visitors users $wgGroupPermissions['*']['createaccount']  = true;

$anonAllowedSpaces = array( NS_MEDIA, NS_MAIN, NS_TALK, NS_USER, NS_USER_TALK, NS_HELP, NS_HELP_TALK, NS_CATEGORY,NS_CATEGORY_TALK,NS_IMAGE ); foreach($anonAllowedSpaces as $ns) {       $wgGroupPermissions['*'][hnpClass::buildPermissionKey($ns,"~","createaccount")]   = true; $wgGroupPermissions['*'][hnpClass::buildPermissionKey($ns,"~","read")]  = false; $wgGroupPermissions['*'][hnpClass::buildPermissionKey($ns,"~","browse")] = false; $wgGroupPermissions['*'][hnpClass::buildPermissionKey($ns,"~","search")] = false; $wgGroupPermissions['*'][hnpClass::buildPermissionKey($ns,"~","viewsource")] = false; }

$wgGroupPermissions['*' ][hnpClass::buildPermissionKey("~","~","createaccount")]   = true;

I even attempted throwing in:

$wgWhitelistRead = array( ":Main_Page", "Special:Userlogin", "-", "MediaWiki:Monobook.css" );

But that failed too.

Almost forgot, using MW 1.11.

- Marc 09/28/07 5:55PM EST.
 * You need to add Special:Userlogin to the $wgGroupPermissions.
 * Lastly, I do not support 1.11... for now ;-) Jean-Lou Dupont 22:00, 28 September 2007 (UTC)


 * I spoke up too soon. But thank you.  I saw the last few lines of code you were using and I suddenly realized that the middle set of " " were to symbolize a page.  This did the trick:

$wgGroupPermissions['*'][hnpClass::buildPermissionKey(NS_SPECIAL,"Userlogin","read")] = true;


 * After logging in, it wanted me to go back to Special:Userlogin, which isn't that big of a deal. I'm sure I can either figure out the redirect afterward on my own, or not worry about it. The important thing is that it now works, for anyone else who wants to prevent anonymous users.


 * But that was actually my second issue. If you don't mind, I'll start a new topic since it's a different issue.

DB locking up
I hope I'm doing this right. In order to create a new page in a Namespace, I'm going Namespace:Pagename. When I do that, after I hit save, I end up locking up my database. I don't know if that's specific to 1.11, or something you're familiar with.

Warning: file_get_contents(/wiki/images/lock_yBgMBwiR) [function.file-get-contents]: failed to open stream: No such file or directory in /wiki/includes/OutputPage.php on line 1061 Database locked From TestWiki Jump to: navigation, search The database is currently locked to new entries and other modifications, probably for routine database maintenance, after which it will be back to normal.

The administrator who locked it offered this explanation:


 * - Marc 09/28/07 6:12PM EST
 * Never heard of such issue for 1.10. Sorry - I haven't tackled 1.11 yet. Jean-Lou Dupont 22:34, 28 September 2007 (UTC)


 * Well that's a bummer. Thanks anyway.  I guess I just need to wait or find another method.  Between this and Extension:UserRightsList, this seemed like the best way for me to do what I needed, which is to restrict different user groups to different namespaces.  I know it's not what the wiki was designed for, but I'm using it for internal documentation.