Page MenuHomePhabricator

Update the globalblock API to support specifying if account creation should be blocked
Closed, ResolvedPublic1 Estimated Story Points

Assigned To
Authored By
• Dreamy_Jazz
Aug 2 2024, 5:56 PM
Referenced Files
F57437586: image.png
Sep 4 2024, 5:42 AM
F57437626: image.png
Sep 4 2024, 5:42 AM
F57437546: image.png
Sep 4 2024, 5:42 AM
F57437372: image.png
Sep 4 2024, 5:42 AM
F57436975: image.png
Sep 4 2024, 5:42 AM
F57436849: image.png
Sep 4 2024, 5:42 AM
F57436867: image.png
Sep 4 2024, 5:42 AM
F57364753: image.png
Sep 4 2024, 5:42 AM

Description

The globalblock API allows callers to globally block in a similar way to the Special:GlobalBlock page. Therefore, in-line with T371693, the API should also support optionally disabling account creation.

To ensure that existing users of the API are not negatively affected, we should ensure that the default is to disable account creation.

Acceptance criteria
  • Update the globalblocks API to allow callers to optionally disable account creation (instead of always disabling account creation)

Related Objects

Event Timeline

Change #1059415 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/GlobalBlocking@master] Update ApiGlobalBlock to optionally disable account creation

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

Change #1059415 merged by jenkins-bot:

[mediawiki/extensions/GlobalBlocking@master] Update ApiGlobalBlock to optionally disable account creation

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

For QA I would suggest using Special:ApiSandbox to globally block targets while checking and not checking the new allow-account-creation and local-allow-account-creation checkboxes on the page. These should work similarly to the Globally disable account creation and Locally disable account creation checkboxes on Special:GlobalBlock, except that the checkboxes are the inverse of each other.

Djackson-ctr subscribed.

QA has been completed and the new code is functioning and displaying as expected, thank you @Dreamy_Jazz for the Test Notes.


Display of the allow-account-creation toggle, and the local-allow-account-creation toggle:

image.png (1,567×981 px, 69 KB)


some Results of my testing this ticket:

image.png (1,135×356 px, 19 KB)

image.png (1,248×256 px, 22 KB)

image.png (828×433 px, 24 KB)

image.png (1,183×473 px, 41 KB)

image.png (1,405×367 px, 37 KB)

image.png (780×430 px, 25 KB)

image.png (1,381×518 px, 46 KB)