From: Thalia Date: Wed, 20 Mar 2019 22:11:33 +0000 (+0000) Subject: Check whether a user is blocked from upload in ApiUpload X-Git-Tag: 1.34.0-rc.0~2450^2 X-Git-Url: http://git.cyclocoop.org/%22.%24image2.%22?a=commitdiff_plain;h=520dbe677af4c521c3a734ae9604a938cef17704;p=lhc%2Fweb%2Fwiklou.git Check whether a user is blocked from upload in ApiUpload Partially blocked users are not blocked from uploading, so check explicitly whether a user is blocked from uploading, rather than simply whether they have a block. Bug: T217255 Change-Id: I21089a90202941ec3bc5bdbf9c0d2e7cab00b365 --- diff --git a/includes/api/ApiUpload.php b/includes/api/ApiUpload.php index 2c5b583f3b..12ecd7411c 100644 --- a/includes/api/ApiUpload.php +++ b/includes/api/ApiUpload.php @@ -542,7 +542,7 @@ class ApiUpload extends ApiBase { } // Check blocks - if ( $user->isBlocked() ) { + if ( $user->isBlockedFromUpload() ) { $this->dieBlocked( $user->getBlock() ); }