mediawiki-extensions-AbuseF.../tests/phpunit/unit
Daimona Eaytoy e8471a717c Add method to properly check visibility of AbuseLog entries
This replaces the previous pattern of callers having to use
RevisionLookup if the result was 'implicit'. Also, in some cases where
we were just hiding things if the visibility was !== true, properly
handle the implicit case by using the new method. Make the new method
return string constants rather than bool|string.

The new method also fixes some potential info leaks which happened when
the row was hidden, the user could view suppressed AbuseLog entries, but
the associated revision was also deleted and the user couldn't see it
(this shouldn't be relevant for WMF wikis since AF deletion is
oversight-level).

Also add a bunch of tests for the various cases to ensure we don't
regress again.

Bug: T261532
Change-Id: I929f865acf5d207b739cb3af043f70cb59243ee0
2021-09-25 00:08:33 +00:00
..
ChangeTags build: Updating dependencies 2021-07-21 18:51:18 +00:00
Consequences build: Updating dependencies 2021-07-21 18:51:18 +00:00
Filter Use static closures where safe to use 2021-04-30 20:55:35 +02:00
Hooks build: Updating dependencies 2021-07-21 18:51:18 +00:00
Parser Refactor ParserStatus 2021-09-17 11:25:54 +00:00
Special build: Updating dependencies 2021-07-21 18:51:18 +00:00
VariableGenerator Rename AbuseFilterVariableGeneratorTest 2021-09-15 18:17:36 +02:00
Variables Clean up / simplify parser-related classes 2021-09-08 13:41:52 +02:00
Watcher build: Updating dependencies 2021-07-21 18:51:18 +00:00
AbuseFilterPermissionManagerTest.php build: Updating dependencies 2021-07-21 18:51:18 +00:00
AbuseLoggerFactoryTest.php Introduce an EditRevUpdater service 2021-01-27 00:24:39 +01:00
BlockAutopromoteStoreTest.php build: Updating dependencies 2021-07-21 18:51:18 +00:00
CentralDBManagerTest.php tests: Use DBConnRef, not IDatabase, as retval of getConnectionRef 2021-08-31 21:45:10 +02:00
EditBoxBuilderFactoryTest.php build: Updating dependencies 2021-07-21 18:51:18 +00:00
EditRevUpdaterTest.php tests: Use DBConnRef, not IDatabase, as retval of getConnectionRef 2021-08-31 21:45:10 +02:00
EditStashCacheTest.php Clean up / simplify parser-related classes 2021-09-08 13:41:52 +02:00
EmergencyCacheTest.php Use independent stats for emergency disable 2021-02-26 18:10:49 +01:00
FilterCompareTest.php Use static closures where safe to use 2021-04-30 20:55:35 +02:00
FilterImporterTest.php build: Updating dependencies 2021-07-21 18:51:18 +00:00
FilterLookupTest.php tests: Use DBConnRef, not IDatabase, as retval of getConnectionRef 2021-08-31 21:45:10 +02:00
FilterProfilerTest.php build: Updating dependencies 2021-07-21 18:51:18 +00:00
FilterRunnerFactoryTest.php Rename ParserFactory -> RuleCheckerFactory 2021-09-08 21:59:34 +02:00
FilterRunnerTest.php Rename ParserFactory -> RuleCheckerFactory 2021-09-08 21:59:34 +02:00
FilterStoreTest.php Use independent stats for emergency disable 2021-02-26 18:10:49 +01:00
FilterValidatorTest.php Refactor ParserStatus 2021-09-17 11:25:54 +00:00
GlobalNameUtilsTest.php build: Updating dependencies 2021-07-21 18:51:18 +00:00
KeywordsManagerTest.php build: Updating dependencies 2021-07-21 18:51:18 +00:00
RunnerDataTest.php Refactor ParserStatus 2021-09-17 11:25:54 +00:00
SpecsFormatterTest.php build: Updating dependencies 2021-07-21 18:51:18 +00:00
TextExtractorTest.php build: Updating dependencies 2021-07-21 18:51:18 +00:00