mediawiki - how to deny access to all pages and allow only for certain on wiki -


i'm using mediawiki 1.13.3 running on freebsd 7.4 i've got confused following task: how deny access pages users (who has account in wiki) or group of these users allow readonly access pages on wiki. goal achieve have no access pages on wiki except allowed few users.

i've tried extensions can't find solution ~20000 pages , few hundreds of users.

see manual:preventing access on mediawiki.org, section "restrict viewing of pages".

specifically, allow read (but not edit) main page , page named public stuff, , allow sysops read , edit pages, you'd add following lines localsettings.php:

# prevent editing , reading anons (except exception listed below): $wggrouppermissions['*']['edit'] = false; $wggrouppermissions['*']['read'] = false;  # same normal registered users: $wggrouppermissions['user']['edit'] = false; $wggrouppermissions['user']['read'] = false;  # allow read access these pages: $wgwhitelistread = array( "main page", "public stuff" );  # allow sysops read , edit normally: $wggrouppermissions['sysop']['edit'] = true; $wggrouppermissions['sysop']['read'] = true; 

of course, can replace sysop above own custom user group; used in example because exists in stock mediawiki install.

(some older example code suggests including "special:userlogin" , possibly "special:changepassword" , "special:passwordreset" in $wgwhitelistread. in modern mediawiki versions should unnecessary, although still harmless.)


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -