mediawiki-extensions-AbuseF.../tests
Dreamy Jazz 85022190e5 Add user_type variable
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
2024-03-07 10:38:25 +00:00
..
parserTests Merge "Add support for regex string replacements." 2022-05-31 14:54:33 +00:00
parserTestsEquivset Move parser tests to /unit 2019-08-28 16:36:37 +00:00
phpunit Add user_type variable 2024-03-07 10:38:25 +00:00
selenium build: Upgrade eslint-config-wikimedia from 0.25.1 to 0.26.0 2024-02-06 09:26:59 -05:00