Background
MediaWiki core has some specific handling for global blocks, which are added via the GlobalBlocking extension. However, core should be unaware of features added by extensions.
They are:
- User::isBlockedGlobally - to find out if a user is blocked, use User::getBlock instead, which will now include global blocks. Or to do something specific with a global block (from an extension), use the GlobalBlocking extension directly. Code in MediaWiki core should not have special handling for global blocks.
- User::getGlobalBlock - as above
- The UserIsBlockedGlobally hook (run from User::getGlobalBlock) - to add any kind of block, use the GetUserBlock hook instead.
- The SystemBlock type global-block (also from User::getGlobalBlock) - GlobalBlocks are now added into CompositeBlocks via the GetUserBlock hook
- Related tests/wiring
After T317334: Remove separate checks for global blocks from PasswordReset and T317325: Remove separate checks for global blocks from APIUpload and SpecialUpload, global blocks are no longer separately checked for from core, so the methods and hook can be deprecated, and any references to global blocks that can be removed should be.
Acceptance criteria
- After this task, any parts of core that are still aware of global blocks are soft deprecated (see documentation: https://www.mediawiki.org/wiki/Stable_interface_policy#Deprecation_process)
- The deprecation is documented in the table on this page: https://www.mediawiki.org/wiki/Manual:Hooks#Available_hooks