Index: trunk/phase3/includes/specials/SpecialImport.php |
— | — | @@ -71,9 +71,16 @@ |
72 | 72 | # FIXME: Title::checkSpecialsAndNSPermissions() has a very wierd expectation of what |
73 | 73 | # getUserPermissionsErrors() might actually be used for, hence the 'ns-specialprotected' |
74 | 74 | $errors = wfMergeErrorArrays( |
75 | | - $this->getTitle()->getUserPermissionsErrors( 'import', $wgUser, true, array( 'ns-specialprotected' ) ), |
76 | | - $this->getTitle()->getUserPermissionsErrors( 'importupload', $wgUser, true, array( 'ns-specialprotected' ) ) |
| 75 | + $this->getTitle()->getUserPermissionsErrors( |
| 76 | + 'import', $wgUser, true, |
| 77 | + array( 'ns-specialprotected', 'badaccess-group0', 'badaccess-groups' ) |
| 78 | + ), |
| 79 | + $this->getTitle()->getUserPermissionsErrors( |
| 80 | + 'importupload', $wgUser, true, |
| 81 | + array( 'ns-specialprotected', 'badaccess-group0', 'badaccess-groups' ) |
| 82 | + ) |
77 | 83 | ); |
| 84 | + |
78 | 85 | if( $errors ){ |
79 | 86 | $wgOut->showPermissionsErrorPage( $errors ); |
80 | 87 | return; |
— | — | @@ -107,6 +114,9 @@ |
108 | 115 | return $wgOut->permissionRequired( 'importupload' ); |
109 | 116 | } |
110 | 117 | } elseif ( $sourceName == "interwiki" ) { |
| 118 | + if( !$wgUser->isAllowed( 'import' ) ){ |
| 119 | + return $wgOut->permissionRequired( 'import' ); |
| 120 | + } |
111 | 121 | $this->interwiki = $wgRequest->getVal( 'interwiki' ); |
112 | 122 | if ( !in_array( $this->interwiki, $wgImportSources ) ) { |
113 | 123 | $source = Status::newFatal( "import-invalid-interwiki" ); |