From c464c4298956cc850e8a5c7bbd5fb0b09f27663d Mon Sep 17 00:00:00 2001 From: Thalia Date: Tue, 16 Jun 2020 16:11:24 +0100 Subject: [PATCH] BlockPermissionChecker: Clarify that 'unblockself' allows altering block Change-Id: Ic9b2e6d8ca7afe4c680c994955ebccfbe89a133c --- includes/block/BlockPermissionChecker.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/block/BlockPermissionChecker.php b/includes/block/BlockPermissionChecker.php index d72d9a282e2..ee8d2a9a502 100644 --- a/includes/block/BlockPermissionChecker.php +++ b/includes/block/BlockPermissionChecker.php @@ -95,11 +95,12 @@ class BlockPermissionChecker { ) { // Blocked admin is trying to alter their own block - // Self-blocked admins can always remove their block + // Self-blocked admins can always remove or alter their block if ( $this->performer->blockedBy() === $this->performer->getName() ) { return true; } + // Users with 'unblockself' right can unblock themselves or alter their own block if ( $this->permissionManager->userHasRight( $this->performer, 'unblockself' ) ) { return true; } else {