Index: trunk/extensions/AbuseFilter/Views/AbuseFilterViewImport.php |
— | — | @@ -5,6 +5,12 @@ |
6 | 6 | function show( ) { |
7 | 7 | global $wgOut; |
8 | 8 | |
| 9 | + global $wgUser; |
| 10 | + if ( !$wgUser->isAllowed( 'abusefilter-modify' ) ) { |
| 11 | + $wgOut->addWikiMsg( 'abusefilter-edit-notallowed' ); |
| 12 | + return; |
| 13 | + } |
| 14 | + |
9 | 15 | $wgOut->addWikiMsg( 'abusefilter-import-intro' ); |
10 | 16 | |
11 | 17 | $html = Xml::textarea( 'wpImportText', '', 40, 20 ); |
Index: trunk/extensions/AbuseFilter/Views/AbuseFilterViewEdit.php |
— | — | @@ -17,6 +17,11 @@ |
18 | 18 | $filter = $this->mFilter; |
19 | 19 | $history_id = $this->mHistoryID; |
20 | 20 | $this->mSkin = $wgUser->getSkin(); |
| 21 | + |
| 22 | + if ( $filter == 'new' && !$wgUser->isAllowed( 'abusefilter-modify' ) ) { |
| 23 | + $wgOut->addWikiMsg( 'abusefilter-edit-notallowed' ); |
| 24 | + return; |
| 25 | + } |
21 | 26 | |
22 | 27 | $editToken = $wgRequest->getVal( 'wpEditToken' ); |
23 | 28 | $didEdit = $this->canEdit() |
Index: trunk/extensions/AbuseFilter/AbuseFilter.i18n.php |
— | — | @@ -222,6 +222,7 @@ |
223 | 223 | 'abusefilter-edit-syntaxerr' => 'Syntax error detected: $1', |
224 | 224 | 'abusefilter-edit-bad-tags' => 'One or more of the tags you specified is not valid. |
225 | 225 | Tags should be short, and they should not contain special characters.', |
| 226 | + 'abusefilter-edit-notallowed' => 'You are not permitted to create or edit abuse filters', |
226 | 227 | |
227 | 228 | // Filter editing helpers |
228 | 229 | 'abusefilter-edit-builder-select' => 'Select an option to add it at the cursor', |