[Mediawiki-l] Make Wiki readable only for logged in users

Jeroen van de Nieuwenhof lists at vandenieuwenhof.nl
Sat May 20 16:07:21 UTC 2006


This is the part i added to my clean install of the wiki. It's part of
Localsettings.php:

# Group permissions
$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*']['edit'] = false;
$wgShowIPinHeader = false; # For non-logged in users
$wgWhitelistRead = array( "Main Page", "Special:Userlogin", "-",
"MediaWiki:Monobook.css" );
$wgGroupPermissions['*']['read'] = false;

Rotem Liss wrote:
> It is written in the guide, and they should be allowed to apply the
> custom CSS of the site. I would also add "MediaWiki:Common.css".
>
>
> Jimmy Collins wrote:
>
>>Why "-" and "MediaWiki:Monobook.css" ?
>>
>>
>>
>>>-----Ursprüngliche Nachricht-----
>>>Von: MediaWiki announcements and site admin list
>>> <mediawiki-l at Wikimedia.org>
>>>Gesendet: 20.05.06 14:56:17
>>>An: MediaWiki announcements and site admin list
>>> <mediawiki-l at Wikimedia.org>
>>>Betreff: Re: [Mediawiki-l] Make Wiki readable only for logged in users
>>>
>>>
>>
>>
>>
>>
>>>Did you add the following code to LocalSettings.php? It should fix the
>>>problem.
>>>
>>>$wgWhitelistRead = array( "Main Page", "Special:Userlogin", "-",
>>> "MediaWiki:Monobook.css" );
>>>
>>>
>>>lists at vandenieuwenhof.nl wrote:
>>>
>>>
>>>
>>>>I want to disable access to my wiki for non logged in users. I've read
>>>>this howto: http://meta.wikimedia.org/wiki/Help:User_rights but i have
>>>> one
>>>>question.
>>>>
>>>>Now i can't login, because i keep redirected to the 'you must be logged
>>>>in" page. In the howto it says that i should change the function
>>>>LoginToUse in includes/outputpage.php. Should i add the given code or
>>>>change the old code with the new?
>>>>
>>>>I tried to add the code and to change the old code to the given code,
>>>> but
>>>>both give me an error.
>>>>
>>>>The howto says the following:
>>>>
>>>>Main Page is not mandatory for this list. To avoid "login required"
>>>>redirect page, you can change includes/OuputPage.php loginToUse():
>>>>
>>>>function loginToUse() {
>>>>   $titleObj = Title::makeTitle( NS_SPECIAL, "Userlogin" );
>>>>   $this->redirect( $titleObj->getFullURL() );
>>>>}
>>>>
>>>>What should i do?
>>>>
>>>>_______________________________________________
>>>>MediaWiki-l mailing list
>>>>MediaWiki-l at Wikimedia.org
>>>>http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>>>>
>>>>
>>>>
>>>>
>>>>
>>>--
>>>#define Name RotemLiss
>>>#define Mail mailSTRUDELrotemlissDOTcom
>>>#define Site www.rotemliss.com
>>>
>>>
>>><hr>
>>>_______________________________________________
>>>MediaWiki-l mailing list
>>>MediaWiki-l at Wikimedia.org
>>>http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>>>
>>>
>>>
>>
>>
>>_______________________________________________
>>MediaWiki-l mailing list
>>MediaWiki-l at Wikimedia.org
>>http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>>
>>
>>
>
> --
> #define Name RotemLiss
> #define Mail mailSTRUDELrotemlissDOTcom
> #define Site www.rotemliss.com
>
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l at Wikimedia.org
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>





More information about the MediaWiki-l mailing list