Add "abusefilter-bypass" userright as a hack for GlobalRename page moves

GlobalRename is having its page moves stopped by AbuseFilter rules
that shouldn't affect it at all. This is a temporary hack until
something like bug 67936 is fixed.

This is less evil than unsubscribing AbuseFilter from $wgHooks IMO.

Change-Id: I6b301fda119be167d3f092d86ba5914289045fab
This commit is contained in:
Kunal Mehta 2014-07-22 23:02:09 -07:00
parent 39fb819b9c
commit d962b418a9

View file

@ -302,6 +302,14 @@ class AbuseFilterHooks {
$vars = new AbuseFilterVariableHolder;
global $wgUser;
// HACK: This is a secret userright so system actions
// can bypass AbuseFilter. Should not be assigned to
// normal users. This should be turned into a proper
// userright in bug 67936.
if ( $wgUser->isAllowed( 'abusefilter-bypass' ) ) {
return true;
}
$vars->addHolders(
AbuseFilter::generateUserVars( $wgUser ),
AbuseFilter::generateTitleVars( $oldTitle, 'MOVED_FROM' ),