mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 06:03:49 +00:00
85022190e5
Why: * An AbuseFilter variable is needed that allows filters to determine what type the current user is. That is, whether the user is an IP address, temporary account, named user or external user. * Currently filters implement this by inspecting the value in the 'user_name' variable, but this is likely to break when temporary accounts are enabled as IPs would be hidden. * Giving a dedicated variable that indicates the type of the user allows filters to work out this information without having to know the specific username of the user before performing the check. What: * Add the 'user_type' variable which is lazily computed. It can have the value 'named', 'temp', 'ip' or 'external' depending on the type of the user. If the user does not match any of these, then the value is 'unknown'. * Replace call to deprecated User::newFromIdentity with a use of the UserFactory service that is dependency injected. * Add and update tests to ensure consistent test coverage. Bug: T357615 Change-Id: Ifffa891879e7e49d2430a0330116b34c5a03049d |
||
---|---|---|
.. | ||
parserTests | ||
parserTestsEquivset | ||
phpunit | ||
selenium |