Allow users to block the user that blocked them.
authorBrian Wolff <bawolff+wn@gmail.com>
Tue, 27 Nov 2018 18:38:14 +0000 (18:38 +0000)
committerGergő Tisza <gtisza@wikimedia.org>
Sun, 9 Dec 2018 23:24:57 +0000 (15:24 -0800)
commit6585277528ba75d52ccecbe8226fd3461907d662
treebef8b8b33af48332811e3ff65036e53fb783d240
parentcf9e3c64b0a4058b504c5b944780966acb345549
Allow users to block the user that blocked them.

This is to make it so that blocking all other admins is not
a succesful attack plan, as the blocked admins can block the
blocker, and then it ends in a stalemate with everyone blocked.

This also allows users with unblock-self right to adjust their
own blocks. The code already existed for this but was broken.

Credit for this idea goes to Tgr.

Bug: T150826
Change-Id: I0418279fdb2a59f8f1d7eeb8931d874123d03e4f
includes/specials/SpecialBlock.php
tests/phpunit/includes/specials/SpecialBlockTest.php