mediawiki-extensions-AbuseF.../tests/phpunit/unit
Daimona Eaytoy 6ac574dada Add missing permission check to canSeeLogDetailsForFilter
`canSeeLogDetails` should also be checked when a filter is protected, as
it is the base right for being able to see abuselog entries. With this
in mind, check that immediately at the beginning of the method, instead
of repeating calls. Also merge the conditionals, and return early when a
permission check fails.

Move a test up so that it comes immediately after its data provider, and
add test cases for a few combinations of rights.

Change-Id: Ic3cf58f43803bef8bf2d65566434baff145b3fd5
2024-07-02 22:43:09 +02:00
..
ChangeTags tests: Widen @covers tags in phpunit tests 2024-04-17 01:44:40 +01:00
Consequences tests: Widen @covers tags in phpunit tests 2024-04-17 01:44:40 +01:00
Filter Allow variables to be restricted by user right 2024-06-04 06:54:53 -07:00
Hooks Use namespaced classes 2024-06-12 20:01:35 +02:00
Parser Force full evaluation of filter in FilterEvaluator->getUsedVars() 2024-06-11 02:43:47 -07:00
Special tests: Widen @covers tags in phpunit tests 2024-04-17 01:44:40 +01:00
VariableGenerator Add user_unnamed_ip variable 2024-05-23 07:19:48 -07:00
Variables Use namespaced classes 2024-06-12 20:01:35 +02:00
Watcher tests: Widen @covers tags in phpunit tests 2024-04-17 01:44:40 +01:00
AbuseFilterPermissionManagerTest.php Add missing permission check to canSeeLogDetailsForFilter 2024-07-02 22:43:09 +02:00
AbuseLoggerFactoryTest.php tests: Widen @covers tags in phpunit tests 2024-04-17 01:44:40 +01:00
ActionSpecifierTest.php tests: Widen @covers tags in phpunit tests 2024-04-17 01:44:40 +01:00
BlockAutopromoteStoreTest.php tests: Widen @covers tags in phpunit tests 2024-04-17 01:44:40 +01:00
CentralDBManagerTest.php tests: Use IDatabase for mocking instead of DBConnRef 2024-05-02 22:32:05 +02:00
EditBoxBuilderFactoryTest.php tests: Widen @covers tags in phpunit tests 2024-04-17 01:44:40 +01:00
EditRevUpdaterTest.php tests: Use IDatabase for mocking instead of DBConnRef 2024-05-02 22:32:05 +02:00
EditStashCacheTest.php tests: Widen @covers tags in phpunit tests 2024-04-17 01:44:40 +01:00
EmergencyCacheTest.php tests: Widen @covers tags in phpunit tests 2024-04-17 01:44:40 +01:00
FilterCompareTest.php tests: Widen @covers tags in phpunit tests 2024-04-17 01:44:40 +01:00
FilterImporterTest.php Convert af_hidden into a bitmask 2024-05-28 00:59:08 -07:00
FilterLookupTest.php Allow variables to be restricted by user right 2024-06-04 06:54:53 -07:00
FilterProfilerTest.php tests: Widen @covers tags in phpunit tests 2024-04-17 01:44:40 +01:00
FilterRunnerFactoryTest.php tests: Widen @covers tags in phpunit tests 2024-04-17 01:44:40 +01:00
FilterStoreTest.php Remove AbuseFilterActorMigration 2024-06-15 09:42:27 +02:00
FilterValidatorTest.php FilterValidatorTest: Use MediaWiki core status assertions 2024-06-25 20:44:51 +00:00
GlobalNameUtilsTest.php tests: Widen @covers tags in phpunit tests 2024-04-17 01:44:40 +01:00
KeywordsManagerTest.php tests: Widen @covers tags in phpunit tests 2024-04-17 01:44:40 +01:00
RunnerDataTest.php tests: Widen @covers tags in phpunit tests 2024-04-17 01:44:40 +01:00
SpecsFormatterTest.php Allow variables to be restricted by user right 2024-06-04 06:54:53 -07:00
TextExtractorTest.php Use namespaced classes 2024-06-12 20:01:35 +02:00