mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 06:03:49 +00:00
Fix Bug 33390 - Examine page is visible for hidden log entries
Fix Bug 24186 - "Examine" page is visible to users without abusefilter-log-detail right Author: Nikola Kovacs There was a more complex patch on Bug 24186, but I think he makes a good argument why his is better. Beware: I'm not set up to test AbuseFilter, but I didn't see anyone else in core MW who regularly works on it.
This commit is contained in:
parent
66cbb546b6
commit
a4858a5109
Notes:
Raimond Spekking
2012-03-12 20:46:25 +00:00
|
@ -104,6 +104,7 @@ Filter description: $7 ($8)',
|
|||
'abusefilter-log-linkoncontribs-text' => 'Abuse log for this user',
|
||||
'abusefilter-log-hidden' => '(entry hidden)',
|
||||
'abusefilter-log-hide' => 'hide or unhide', // @todo FIXME: Message unused?
|
||||
'abusefilter-log-cannot-see-details' => 'You do not have permission to see details of any entries.',
|
||||
'abusefilter-log-details-hidden' => 'You cannot view the details for this entry because it is hidden from public view.',
|
||||
|
||||
// Hiding log entries
|
||||
|
@ -580,6 +581,7 @@ $messages['qqq'] = array(
|
|||
'abusefilter-log-linkoncontribs-text' => 'Title for link added on [[Special:Contributions]] and other relevant special pages.',
|
||||
'abusefilter-log-hidden' => 'Text for a hidden log entry.',
|
||||
'abusefilter-log-hide' => 'This message may be unused.',
|
||||
'abusefilter-log-cannot-see-details' => 'Message show instead of the log row for users without permissions to see any details.',
|
||||
'abusefilter-log-details-hidden' => 'Message shown instead of log row details when those are hidden.',
|
||||
'abusefilter-log-hide-legend' => 'Legend for form to hide a log entry.',
|
||||
'abusefilter-log-hide-id' => 'Field label in form to hide a log entry.',
|
||||
|
|
|
@ -106,6 +106,16 @@ class AbuseFilterViewExamine extends AbuseFilterView {
|
|||
self::$examineType = 'log';
|
||||
self::$examineId = $logid;
|
||||
|
||||
if ( !SpecialAbuseLog::canSeeDetails() ) {
|
||||
$this->getOutput()->addWikiMsg( 'abusefilter-log-cannot-see-details' );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( $row->afl_deleted && !SpecialAbuseLog::canSeeHidden() ) {
|
||||
$this->getOutput()->addWikiMsg( 'abusefilter-log-details-hidden' );
|
||||
return;
|
||||
}
|
||||
|
||||
$vars = AbuseFilter::loadVarDump( $row->afl_var_dump );
|
||||
|
||||
$this->showExaminer( $vars );
|
||||
|
|
Loading…
Reference in a new issue