Page MenuHomePhabricator

Ensure that blocked users/IPs can not make edits
Closed, ResolvedPublic3 Estimated Story Points

Description

Acceptance criteria:

  • feature has been checked and is working as expected
  • corresponding e2e test is in place

Action API endpoint to block/unblock a user: https://www.mediawiki.org/wiki/API:Block

Event Timeline

Silvan_WMDE set the point value for this task to 3.

Task Breakdown notes

  • verify the feature is working
  • add 'blocked user/IP' test to the 'Authorization' section of the AuthTest.js e2e-test
    • use the 'block' API action to set up the test (see task description)

Change 881416 had a related patch set uploaded (by Muhammad Jaziraly; author: Muhammad Jaziraly):

[mediawiki/extensions/Wikibase@master] REST: Test edit while user blocked

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

I've tested the edit functionality while the user is blocked (using the REST API to edit), and it's working properly.

The response for edit using REST API after blocking was:

{
	"error": "rest-write-denied",
	"httpCode": 403,
	"httpReason": "Forbidden"
}

And a new e2e test was written to cover it.

Change 881416 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] REST: Test edit while user blocked

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