Page MenuHomePhabricator

Suggested Investigations: Take globally blocked users into account for case auto-closure
Closed, ResolvedPublic

Description

Background

In T414979: Close the cases when all accounts are already blocked a mechanism for closing SI cases where all users are blocked was implemented. For now, it applies only to accounts blocked locally. However, another common scenario is that an account is globally blocked, in which case we don't need to wait for a local block to apply auto-closure.

User story

As a checkuser:

  • I don't need to differentiate whether an account in case is blocked globally or locally
  • I don't need to investigate accounts that were blocked globally, because they were already handled at "higher level"

Acceptance criteria

  • Cases that consist only of users blocked locally and/or globally are automatically closed
  • If $wgApplyGlobalBlocks is set to false, globally blocked accounts are ineligible for auto-closure
  • If an account is globally blocked, but the block is unset locally, the account should be treated as globally unblocked for auto-closure check

Non-goals of this task (will be handled in separate tasks):

  • Globally blocking an account doesn't need to trigger automatic closure
  • Whether an account is locked doesn't need to be checked as part of this task

Event Timeline

Change #1238779 had a related patch set uploaded (by Mpostoronca; author: Mpostoronca):

[mediawiki/extensions/CheckUser@master] Introduce interface and service for checking if a user is blocked

https://gerrit.wikimedia.org/r/1238779

Change #1238780 had a related patch set uploaded (by Mpostoronca; author: Mpostoronca):

[mediawiki/extensions/CheckUser@master] Add a user is locally blocked check

https://gerrit.wikimedia.org/r/1238780

Change #1238781 had a related patch set uploaded (by Mpostoronca; author: Mpostoronca):

[mediawiki/extensions/CheckUser@master] Add a check for "user is globally blocked"

https://gerrit.wikimedia.org/r/1238781

Change #1238782 had a related patch set uploaded (by Mpostoronca; author: Mpostoronca):

[mediawiki/extensions/CheckUser@master] Use CompositeIndefiniteBlockChecker in auto-close job

https://gerrit.wikimedia.org/r/1238782

Change #1238779 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Introduce interface and service for checking if a user is blocked

https://gerrit.wikimedia.org/r/1238779

Change #1238780 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Add a user is locally blocked check

https://gerrit.wikimedia.org/r/1238780

Change #1238781 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Add a check for "user is globally blocked"

https://gerrit.wikimedia.org/r/1238781

Change #1238782 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Use CompositeIndefiniteBlockChecker in auto-close job

https://gerrit.wikimedia.org/r/1238782

Change #1239629 had a related patch set uploaded (by Mpostoronca; author: Mpostoronca):

[mediawiki/extensions/CheckUser@master] Change performer of auto-closed jobs

https://gerrit.wikimedia.org/r/1239629

Change #1239629 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Change performer of auto-closed jobs

https://gerrit.wikimedia.org/r/1239629

dom_walden subscribed.

On my local environment, I raised a case against every user and triggered the auto-close job for all of them. Afterwards, I checked that there were no open cases where the user had either a local or global sitewide indefinite block and there were no closed cases where the user had no local or global blocks.

  • If an account is globally blocked, but the block is unset locally, the account should be treated as globally unblocked for auto-closure check

This doesn't appear to be true. I globally blocked a user and selected the option to create a local block as well. I then removed the local block and ran the auto-close job. The case was closed. This seems to me to be desirable behaviour. Is there a typo in the above acceptance criterion? @mszwarc @MPostoronca-WMF

  • If an account is globally blocked, but the block is unset locally, the account should be treated as globally unblocked for auto-closure check

This doesn't appear to be true. I globally blocked a user and selected the option to create a local block as well. I then removed the local block and ran the auto-close job. The case was closed. This seems to me to be desirable behaviour. Is there a typo in the above acceptance criterion? @mszwarc @MPostoronca-WMF

I'm neither of these people, but my understanding is that this means locally disabling the global block using Special:GlobalBlockWhitelist (i.e. the global block is unset locally). Essentially if the user can edit on the wiki even if they have a global block on them, it probably means that a CU needs to at least review whether that should be changed before the case is closed

I'm neither of these people, but my understanding is that this means locally disabling the global block using Special:GlobalBlockWhitelist (i.e. the global block is unset locally). Essentially if the user can edit on the wiki even if they have a global block on them, it probably means that a CU needs to at least review whether that should be changed before the case is closed

Ah, of course. In that case, I can confirm the case isn't closed if the user's global block is disabled locally. Thanks.

  • If an account is globally blocked, but the block is unset locally, the account should be treated as globally unblocked for auto-closure check

This doesn't appear to be true. I globally blocked a user and selected the option to create a local block as well. I then removed the local block and ran the auto-close job. The case was closed. This seems to me to be desirable behaviour. Is there a typo in the above acceptance criterion? @mszwarc @MPostoronca-WMF

I'm neither of these people, but my understanding is that this means locally disabling the global block using Special:GlobalBlockWhitelist (i.e. the global block is unset locally). Essentially if the user can edit on the wiki even if they have a global block on them, it probably means that a CU needs to at least review whether that should be changed before the case is closed

Yes, what @Dreamy_Jazz says was the intention behind this AC.

Dreamy_Jazz updated the task description. (Show Details)