Author: wikimedia
Description:
I tried to restrict access to mediawiki in order to disallow read for anonymous.
I also wanted to restrict account creation, so I put the following lines in
LocalSettings:
$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*']['read'] = false;
$wgGroupPermissions['*']['edit'] = false;
As soon as I put those lines, I've been unable to access login page.
The following patch allows you to login even if 'createaccount' is set to false.
- ../foo/mediawiki-1.5.6/includes/Title.php 2005-10-30 02:30:44.000000000 +0100
+++ includes/Title.php 2006-02-27 21:07:33.000000000 +0100
@@ -1004,9 +1004,11 @@
global $wgWhitelistRead; /** If anon users can create an account,
- they need to reach the login page first! */
- if( $wgUser->isAllowed( 'createaccount' )
- && $this->getNamespace() == NS_SPECIAL
+ they need to reach the login page first!
+ Already registered users need also to reach
+ the login page.
+ */
+ if( $this->getNamespace() == NS_SPECIAL
&& $this->getText() == 'Userlogin' ) { return true; }
Version: 1.5.x
Severity: normal
OS: FreeBSD