mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-09-24 10:48:17 +00:00
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:
parent
39fb819b9c
commit
d962b418a9
|
@ -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' ),
|
||||
|
|
Loading…
Reference in a new issue