Add right- message, and actually make the right do something!

This commit is contained in:
Andrew Garrett 2009-01-27 20:18:36 +00:00
parent 85ee0091df
commit ca47e8c408
2 changed files with 3 additions and 1 deletions

View file

@ -53,6 +53,7 @@ A brief description of the abuse rule which your action matched is: $1",
'right-abusefilter-log' => 'View the abuse log',
'right-abusefilter-log-detail' => 'View detailed abuse log entries',
'right-abusefilter-private' => 'View private data in the abuse log',
'right-abusefilter-modify-restricted' => 'Modify filters with restricted actions',
// Abuse Log
'abusefilter-log' => 'Abuse filter log',

View file

@ -46,7 +46,8 @@ class AbuseFilterViewEdit extends AbuseFilterView {
// Check for restricted actions
global $wgAbuseFilterRestrictedActions;
if ( count( array_intersect( $wgAbuseFilterRestrictedActions, array_keys( array_filter( $actions ) ) ) ) ) {
if ( count( array_intersect( $wgAbuseFilterRestrictedActions, array_keys( array_filter( $actions ) ) ) ) &&
!$wgUser->isAllowed( 'abusefilter-modify-restricted' ) ) {
$wgOut->addHTML( $this->buildFilterEditor( wfMsgExt( 'abusefilter-edit-restricted', 'parse' ), $this->mFilter, $history_id ) );
return;
}