[go: up one dir, main page]

Page MenuHomePhabricator

Allow partial action blocks to be performed via ApiBlock
Closed, ResolvedPublic3 Estimated Story Points

Description

T279556 introduces infrastructure for making partial blocks against actions.

It should be possible to do this via the API as well as via the SpecialPage. Handling in the SpecialPage is introduced in the original patch; this task is for the API.

What needs to be done?

  • ApiBlock should recognise a new parameter actionrestrictions in addition to the existing pagerestrictions and namespacerestrictions
  • Allowed values should be the values returned by the BlockActionInfo service
  • Action restrictions should be added into the $restrictions array passed to the BlockUser object.

Event Timeline

Change 683684 had a related patch set uploaded (by Tchanders; author: Tchanders):

[mediawiki/core@master] Allow partial action blocks to be made via ApiBlock

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

Change 683684 merged by jenkins-bot:

[mediawiki/core@master] Allow partial action blocks to be made via ApiBlock

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

dom_walden subscribed.

I have been able to use the API to create blocks against the upload, move and create actions.

You pass the name of the action (e.g. create) to the API. If this is invalid, it returns a warning but otherwise creates the block (ignoring whichever action restrictions were invalid). This is very much like namespace restrictions.

Test environment: various beta wikis, MediaWiki 1.37.0-alpha (bb285a7) 06:37, 5 May 2021.