Currently, the AutopromoteCondition hook assumes that we're testing a user, which is potentially going to be autopromoted. The main consequences of this are: the tested user must be from the local wiki and the tested user is assumed to be performing the current request. These assumptions will no longer be true in general, after extending the scope of UserRequirementsConditionChecker.
Therefore, a new hook will need to be created, which will eventually replace the old one.
Acceptance criteria
- UserRequirementsCondition hook is created with signature (string|int $type, array $args, UserIdentity $user, bool $isPerformingRequest, bool &$result)
- UserRequirementsConditionChecker::checkCondition fires the new hook regardless of whether the user is local or remote, regardless of it being the request performer or not.
- AutopromoteCondition hook is deprecated but still called – provided that the user is from local wiki and is the request performer.