Mediawiki article permission, block special pages -
i need 2 things:
i create article in mediawiki f.ex. financial data , block users except 1 user or user group called "financial". there way make simple, maybe while creating article?
i block special pages users, how it? blocked editing, discussing etc , need block special pages users.
first: if need set per article permission, using wrong tool. mediawiki designed open , highly collaborative, , working around a) require hacks , b) never entirely secure. (see mediawiki: security issues authorization extensions. in brief: there will ways users access content of restricted pages.)
now, if still want try , restrict access pages, there few extensions choose from. among thoose extension:lockdown allow set per namespace permissions, , special page restrictions. have create 1 namespace per access setting, , put financial data in restricted namespace, e.g. restricted:financial
localsettings.php (just example!):
#add new user group $wggrouppermissions['trusted-user'] = $wggrouppermissions['user']; #add namespace define('ns_restricted', 550); define('ns_restricted_talk', 551); $wgextranamespaces[ns_restricted] = 'restricted'; $wgextranamespaces[ns_restricted_talk] = 'restricted_talk'; #lockdown namespace $wgnamespacepermissionlockdown[ns_restricted]['read'] = array('trusted-user'); $wgnamespacepermissionlockdown[ns_restricted_talk]['read'] = array('trusted-user'); #disallow inclusion $wgnonincludablenamespaces[] = ns_restricted; $wgnonincludablenamespaces[] = ns_restricted_talk;
note added namespace $wgnonincludablenamespaces
, prevent users viewing content through inclusion (by writing {{restricted:financial}}
on page).
then proceed lock down special pages:
$wgspecialpagelockdown['statistics'] = array('sysop'); $wgspecialpagelockdown['version'] = array('sysop'); $wgspecialpagelockdown['export'] = array('sysop'); ...
this long list, , change bit version version of mediawiki, special pages come , go.
*before start heading down path, please read warnings @ https://www.mediawiki.org/wiki/manual:preventing_access#restrict_viewing_of_certain_specific_pages , , think again if mediawiki right tool needs*
Comments
Post a Comment