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)

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 (981×1 px, 69 KB)


some Results of my testing this ticket:

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

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

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

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

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

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

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