This forum is no longer active. Please post your questions to our new community site

Forums MediaWiki

Can I password protect only some mediawiki pages

Subscribe to Can I password protect only some mediawiki pages 6 post(s), 4 voice(s)

 
Avatar bushido26 3 post(s)

Hi,

I have recently installed the bitnami mediawiki stack on a solaris 10 machine. It is up and running lovely but I need to put some content on there that needs locking down, meaning people have to log in to view.

I am happy for all to see the main site but when they navigate to the “supported systems” page for example then I want them to have to log in

What is the best way of achieving this please??

Thanks

 
Avatar antonio 621 post(s)

Hi,

Honestly, I have no idea. Maybe another user can teach us both how.

Cheers

 
Avatar bushido26 3 post(s)

Hi,

I found it!

I added the following to my LocalSettings.php and it worked a dream…..

  1. Disable reading by anonymous users
    $wgGroupPermissions’*’ = false;
  1. But allow them to read e.g., these pages:
    $wgWhitelistRead = array ( “Main Page”, “Special:Userlogin”, “Help:Contents);
  1. Like previous, but for French (be careful of encoding! save file as UTF-8!)
  2. $wgWhitelistRead = array( Principale”, “Special:Userlogin”, “Aide en français”);

Hope it helps someone else!

 
Avatar bushido26 3 post(s)

that bit didnt quite come out right…..just add these lines

$wgGroupPermissions’*’ = false;

$wgWhitelistRead = array ( “Main Page”, “Special:Userlogin”, “Help:Contents);

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Thanks for posting this information. It will be very helpful for a lot of mediawiki users.

 
Avatar andrewwells 4 post(s)

hey mate I tried those lines, but after I entered them I just get a blank document. After I remove them my page loads as normal. I’m really new to this so I don’t really have anything constructive to add, except that it didn’t work for me. Anyone know why?

Forums MediaWiki