From: David Barratt Date: Thu, 18 Jul 2019 21:29:46 +0000 (-0400) Subject: Do not block autopromote on partial blocks X-Git-Tag: 1.34.0-rc.0~884^2~1 X-Git-Url: http://git.heureux-cyclage.org/?a=commitdiff_plain;h=1ad840da6887c3c0fbe3c1aabafe1c151e5c508c;hp=8ee4d6a0c9748aedd5bdd7dbb982804a9acb34e0;p=lhc%2Fweb%2Fwiklou.git 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 --- 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: