From 1ad840da6887c3c0fbe3c1aabafe1c151e5c508c Mon Sep 17 00:00:00 2001 From: David Barratt Date: Thu, 18 Jul 2019 17:29:46 -0400 Subject: [PATCH] Do not block autopromote on partial blocks Currently, a partial block will block an autopromote, this should not be the case. Instead, autopromote will only be blocked by sitewide blocks. Bug: T228479 Change-Id: Id945b6ab374cb49c4a265b5ca149e13b68d4acac --- includes/Autopromote.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/includes/Autopromote.php b/includes/Autopromote.php index a4130371b8..b17f1ab1c6 100644 --- a/includes/Autopromote.php +++ b/includes/Autopromote.php @@ -198,8 +198,7 @@ class Autopromote { case APCOND_IPINRANGE: return IP::isInRange( $user->getRequest()->getIP(), $cond[1] ); case APCOND_BLOCKED: - // @TODO Should partial blocks prevent auto promote? - return (bool)$user->getBlock(); + return $user->getBlock() && $user->getBlock()->isSitewide(); case APCOND_ISBOT: return in_array( 'bot', User::getGroupPermissions( $user->getGroups() ) ); default: -- 2.20.1