Lane, Ryan | 15 May 15:54

Re: authentication before viewing pages

> Is it possible to set each user to authenticate first before 
> viewing and
> editing pages instead of authenticating before editing pages? 
> I don't want
> to use htaccess at this moment if mediawiki has this feature. 
> I'm using
> mediawiki-1.10 with AD/LDAP authentication.
> 

// Don't allow anyone except for logged in users to edit
$wgGroupPermissions['*']['edit'] = false;

// Don't allow anyone except for logged in users to view
$wgGroupPermissions['*']['read'] = false;

// Pages anonymous (not-logged-in) users may see
$wgWhitelistRead = array( "Main Page", "Special:Userlogin", "-",
"MediaWiki:Monobook.css" );

Notice you'll also want to use img_auth.php for your images:

$wgUploadPath       = "$wgScriptPath/img_auth.php";

And in apache:

<Location "/w/images">
        Order Allow,Deny
        Deny from all
        # any other security features you need
</Location>

V/r,

Ryan Lane

Gmane