It is impossible to reach the unblockself code if someone is anonymous, so
there is no need to check that the block applies to that permission.
Bug: T228538
Change-Id: Ie7b1e0f37363cc9e75ee2c871c06cefdfb2eb1d1
if ( $performer->getBlock() ) {
if ( $target instanceof User && $target->getId() == $performer->getId() ) {
# User is trying to unblock themselves
- // @TODO Ensure that the block does not apply to the `unblockself`
- // right.
if ( $performer->isAllowed( 'unblockself' ) ) {
return true;
# User blocked themselves and is now trying to reverse it