Fix permission error shown on history page for protected filter

When a user without the right to see protected filters visits
Special:AbuseFilter/history/<ID>, show the permission error
message for protected filters.

Before this commit, the error message for hidden filters is
used instead, even if the filter is not hidden.

Bug: T364465
Change-Id: If2573fe256a7e29e8184feaf2f0622659706fd56
This commit is contained in:
Thalia 2024-06-05 15:53:04 +01:00
parent 3897096fd7
commit 8f39ef3b8a

View file

@ -84,7 +84,7 @@ class AbuseFilterViewHistory extends AbuseFilterView {
return;
}
if ( isset( $filterObj ) && $filterObj->isProtected() && !$canViewProtectedVars ) {
$out->addWikiMsg( 'abusefilter-history-error-hidden' );
$out->addWikiMsg( 'abusefilter-history-error-protected' );
return;
}
}