Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/311348

Change subject: Make ApiMain use isBot() to catch global bots in checkReadOnly()
......................................................................

Make ApiMain use isBot() to catch global bots in checkReadOnly()

Change-Id: I2090b1aad8a5858965e4ec261f8e88c37414e804
---
M includes/api/ApiMain.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/48/311348/1

diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php
index 1f3c76a..ae3f3f2 100644
--- a/includes/api/ApiMain.php
+++ b/includes/api/ApiMain.php
@@ -1299,7 +1299,7 @@
                }
 
                if ( $module->isWriteMode()
-                       && in_array( 'bot', $this->getUser()->getGroups() )
+                       && $this->getUser()->isBot()
                        && wfGetLB()->getServerCount() > 1
                ) {
                        $this->checkBotReadOnly();

-- 
To view, visit https://gerrit.wikimedia.org/r/311348
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2090b1aad8a5858965e4ec261f8e88c37414e804
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to