Thread:Project:Support desk/Protect Special pages/reply (8)

The above code snippet by Mark has just a little typo error: miss a ")". But it works great! Maybe you can need to allow only the "Login Page" (that is a Special page). So you can do it adding this row:

function disableAllSpecialPages(&$list) { global $wgUser; if(!$wgUser->isAllowed('editinterface')) { $list = array; // Enable Login page $list['Userlogin'] = "LoginForm"; } return true; } $wgHooks['SpecialPage_initList'][]='disableAllSpecialPages';