From 7e3ef7cf5e63324daa5c43ac7c1abe010e36e872 Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Fri, 12 Dec 2008 14:06:30 +0000 Subject: [PATCH] Quick hack to disable import for non privileged users. Prolly a regression from r43963 --- includes/specials/SpecialImport.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/includes/specials/SpecialImport.php b/includes/specials/SpecialImport.php index 9c158fe603..5e1a653329 100644 --- a/includes/specials/SpecialImport.php +++ b/includes/specials/SpecialImport.php @@ -128,6 +128,11 @@ class SpecialImport extends SpecialPage { private function showForm() { global $wgUser, $wgOut, $wgRequest, $wgTitle, $wgImportSources; + # FIXME: Quick hack to disable import for non privileged users /Raymond + # Regression from 43963 + if( !$wgUser->isAllowed( 'import' ) && !$wgUser->isAllowed( 'importupload' ) ) + return $wgOut->permissionRequired( 'import' ); + $action = $wgTitle->getLocalUrl( 'action=submit' ); if( $wgUser->isAllowed( 'importupload' ) ) { @@ -173,8 +178,8 @@ class SpecialImport extends SpecialPage { $wgOut->addWikiMsg( 'importnosources' ); } } - - if( !empty( $wgImportSources ) ) { + + if( $wgUser->isAllowed( 'import' ) && !empty( $wgImportSources ) ) { $wgOut->addHTML( Xml::openElement( 'fieldset' ) . Xml::element( 'legend', null, wfMsg( 'importinterwiki' ) ) . -- 2.20.1