Background
GlobalBlocking's handler for the GetUserPermissionsErrorsExpensive hook is no longer needed, now that global blocks are added via the GetUserBlock hook, since T257701: Add global blocks into CompositeBlocks rather than treating them separately.
Why is it no longer needed?
- GetUserPermissionsErrorsExpensive is fired from PermissionManager::checkPermissionHooks.
- GetUserBlock is eventually fired whenever from PermissionManager::checkUserBlock is called.
- PermissionManager::checkPermissionHooks and PermissionManager::checkUserBlock are both called together from the PermissionManager, here: https://gerrit.wikimedia.org/g/mediawiki/core/+/f53279b7f5cad944ae3a53fdd4e8111acd34a7f4/includes/Permissions/PermissionManager.php#451
At the moment, if a globally blocked user tries to edit, their block is found twice, via the permission and the block checks:
Acceptance criteria
- A globally blocked user is still unable to edit
- A globally blocked user sees only one block message, if they only have a global block