Index: branches/REL1_17/phase3/includes/specials/SpecialImport.php |
— | — | @@ -69,9 +69,16 @@ |
70 | 70 | # FIXME: Title::checkSpecialsAndNSPermissions() has a very wierd expectation of what |
71 | 71 | # getUserPermissionsErrors() might actually be used for, hence the 'ns-specialprotected' |
72 | 72 | $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 | + ) |
75 | 81 | ); |
| 82 | + |
76 | 83 | if( $errors ){ |
77 | 84 | $wgOut->showPermissionsErrorPage( $errors ); |
78 | 85 | return; |
— | — | @@ -105,6 +112,9 @@ |
106 | 113 | return $wgOut->permissionRequired( 'importupload' ); |
107 | 114 | } |
108 | 115 | } elseif ( $sourceName == "interwiki" ) { |
| 116 | + if( !$wgUser->isAllowed( 'import' ) ){ |
| 117 | + return $wgOut->permissionRequired( 'import' ); |
| 118 | + } |
109 | 119 | $this->interwiki = $wgRequest->getVal( 'interwiki' ); |
110 | 120 | if ( !in_array( $this->interwiki, $wgImportSources ) ) { |
111 | 121 | $source = Status::newFatal( "import-invalid-interwiki" ); |