r85103 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85102‎ | r85103 | r85104 >
Date:23:34, 31 March 2011
Author:reedy
Status:ok
Tags:
Comment:
MFT r85099
Modified paths:
  • /branches/wmf/1.17wmf1/includes/specials (modified) (history)
  • /branches/wmf/1.17wmf1/includes/specials/SpecialImport.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/includes/specials/SpecialImport.php
@@ -69,9 +69,16 @@
7070 # FIXME: Title::checkSpecialsAndNSPermissions() has a very wierd expectation of what
7171 # getUserPermissionsErrors() might actually be used for, hence the 'ns-specialprotected'
7272 $errors = wfMergeErrorArrays(
73 - $this->getTitle()->getUserPermissionsErrors( 'import', $wgUser, true, array( 'ns-specialprotected' ) ),
74 - $this->getTitle()->getUserPermissionsErrors( 'importupload', $wgUser, true, array( 'ns-specialprotected' ) )
 73+ $this->getTitle()->getUserPermissionsErrors(
 74+ 'import', $wgUser, true,
 75+ array( 'ns-specialprotected', 'badaccess-group0', 'badaccess-groups' )
 76+ ),
 77+ $this->getTitle()->getUserPermissionsErrors(
 78+ 'importupload', $wgUser, true,
 79+ array( 'ns-specialprotected', 'badaccess-group0', 'badaccess-groups' )
 80+ )
7581 );
 82+
7683 if( $errors ){
7784 $wgOut->showPermissionsErrorPage( $errors );
7885 return;
@@ -105,6 +112,9 @@
106113 return $wgOut->permissionRequired( 'importupload' );
107114 }
108115 } elseif ( $sourceName == "interwiki" ) {
 116+ if( !$wgUser->isAllowed( 'import' ) ){
 117+ return $wgOut->permissionRequired( 'import' );
 118+ }
109119 $this->interwiki = $wgRequest->getVal( 'interwiki' );
110120 if ( !in_array( $this->interwiki, $wgImportSources ) ) {
111121 $source = Status::newFatal( "import-invalid-interwiki" );
Property changes on: branches/wmf/1.17wmf1/includes/specials
___________________________________________________________________
Modified: svn:mergeinfo
112122 Merged /trunk/phase3/includes/specials:r85099

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r85099Fix for r85005: the getUserPermissionsErrors() calls were each returning a ba...happy-melon23:09, 31 March 2011

Status & tagging log