Index: branches/REL1_16/phase3/includes/specials/SpecialImport.php |
— | — | @@ -63,9 +63,16 @@ |
64 | 64 | # FIXME: Title::checkSpecialsAndNSPermissions() has a very wierd expectation of what |
65 | 65 | # getUserPermissionsErrors() might actually be used for, hence the 'ns-specialprotected' |
66 | 66 | $errors = wfMergeErrorArrays( |
67 | | - $this->getTitle()->getUserPermissionsErrors( 'import', $wgUser, true, array( 'ns-specialprotected' ) ), |
68 | | - $this->getTitle()->getUserPermissionsErrors( 'importupload', $wgUser, true, array( 'ns-specialprotected' ) ) |
| 67 | + $this->getTitle()->getUserPermissionsErrors( |
| 68 | + 'import', $wgUser, true, |
| 69 | + array( 'ns-specialprotected', 'badaccess-group0', 'badaccess-groups' ) |
| 70 | + ), |
| 71 | + $this->getTitle()->getUserPermissionsErrors( |
| 72 | + 'importupload', $wgUser, true, |
| 73 | + array( 'ns-specialprotected', 'badaccess-group0', 'badaccess-groups' ) |
| 74 | + ) |
69 | 75 | ); |
| 76 | + |
70 | 77 | if( $errors ){ |
71 | 78 | $wgOut->showPermissionsErrorPage( $errors ); |
72 | 79 | return; |
— | — | @@ -99,6 +106,9 @@ |
100 | 107 | return $wgOut->permissionRequired( 'importupload' ); |
101 | 108 | } |
102 | 109 | } elseif ( $sourceName == "interwiki" ) { |
| 110 | + if( !$wgUser->isAllowed( 'import' ) ){ |
| 111 | + return $wgOut->permissionRequired( 'import' ); |
| 112 | + } |
103 | 113 | $this->interwiki = $wgRequest->getVal( 'interwiki' ); |
104 | 114 | if ( !in_array( $this->interwiki, $wgImportSources ) ) { |
105 | 115 | $source = new WikiErrorMsg( "import-invalid-interwiki" ); |