[Mediawiki-l] making a few SpecialPages restricted

jidanni at jidanni.org jidanni at jidanni.org
Thu Jun 18 23:42:24 UTC 2009


>>>>> "DK" == Daniel Kinzler <daniel at brightbyte.de> writes:
DK> You can use the Lockdown extension to restrict access to special pages

DK> jidanni at jidanni.org schrieb:
>> On Special:Specialpages, Special:Import only shows up if one is a Sysop.
>> How do I make some others listed there act the same? E.g., Special:Ipblocklist.
>> Do I really have to perform open heart surgery,
>> http://www.mediawiki.org/wiki/Manual:Special_pages#Restricting_the_page_to_sysops_or_other_users_with_special_rights
>> or can I use $wgHooks['SpecialPage_initList'] in LocalSettings.php?
>> Must I use $wgUser->isAllowed('editinterface')?
Worried about http://www.mediawiki.org/wiki/Extension:Lockdown#Hiding_pages
I just instead successfully in LocalSettings.php did:
function JidanniLessSpecialPages(&$list){
  foreach(array('Uncategorizedimages','Unusedimages','Withoutinterwiki','Upload',
		'Newimages','Listfiles','MIMEsearch','FileDuplicateSearch','Filepath',
		'Booksources','Mostimages','Tags','Disambiguations'
		)as $i){unset($list[$i]);}
  global $wgUser;
  if(!$wgUser->isAllowed('editinterface')){unset($list[Ipblocklist]);}
  return true;}
$wgHooks['SpecialPage_initList'][]='JidanniLessSpecialPages';



More information about the MediaWiki-l mailing list