T248640 is a hot candidate for this class.
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Urbanecm | T250737 Special:Block should not play the role of a central blocking service/utility | |||
Resolved | Urbanecm | T250020 Refactor logic for doing and logging unblock out of SpecialUnblock so it can be easily reused elsewhere | |||
Resolved | Urbanecm | T248640 Make blockUsers.php script capable of unblocking | |||
Resolved | Urbanecm | T251861 Move SpecialBlock::checkUnblockSelf to a block permissions service |
Event Timeline
Change 588104 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[mediawiki/core@master] Introduce backend classes for (un)blocking users
Change 592287 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[mediawiki/core@master] [WIP] Introduce BlockValidator service for validating block targets
Change 592288 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[mediawiki/core@master] WIP: Introduce backend class for unblocking users
It doesn't look like Platform Engineering is currently actively involved in code review for this task. If code review is needed, please feel free to re-tag with Platform Engineering.
Change 592288 merged by jenkins-bot:
[mediawiki/core@master] Introduce backend class for unblocking users
Tested unblocking various types of blocks with Special:Unblock and API:Unblock. Checked the database to see that the block (and its restrictions) get removed correctly.
Tested that permissions block, unblockself and hideuser were correctly applied for Special:Unblock and API:Unblock.
The only difference I could see is that previously if you tried to unblock a hidden user without the hideuser right, the error message was: You cannot unblock this user, as their username has been hidden.
After this change, it is: You are not allowed to execute the action you have requested.
Tested some form validation, including trying to unblock a user who wasn't blocked and a non-existent user.
Checked that the unblocking events were correctly recorded in Special:Log.
Test environments:
- https://en.wikipedia.beta.wmflabs.org MediaWiki 1.36.0-alpha (211a61b) 07:50, 26 August 2020.
- https://en.wikipedia.beta.wmflabs.org MediaWiki 1.36.0-alpha (cb3597b) 08:48, 28 August 2020.
- vagrant MediaWiki 1.36.0-alpha (211a61b).
The only difference I could see is that previously if you tried to unblock a hidden user without the hideuser right, the error message was: You cannot unblock this user, as their username has been hidden.
After this change, it is: You are not allowed to execute the action you have requested.
Filed as T261761
Change 628126 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[mediawiki/core@master] Hard deprecate SpecialUnblock::processUnblock
Change 628136 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[mediawiki/core@master] [tests] Remove SpecialUnblock::processUnblock calls in SpecialUnblockTest
Change 628136 merged by jenkins-bot:
[mediawiki/core@master] [tests] Remove SpecialUnblock::processUnblock calls in SpecialUnblockTest
Change 628126 merged by jenkins-bot:
[mediawiki/core@master] Hard deprecate SpecialUnblock::processUnblock