jenkins-bot has submitted this change and it was merged.

Change subject: Only add the "oauthadmin" group on the central wiki
......................................................................


Only add the "oauthadmin" group on the central wiki

Needs to be an extension function as labs uses a different
central wiki, thus overrides $wgMWOAuthCentralWiki.

Change-Id: If063a8ffc9989477f7307f6bd6be73d496eebd86
---
M wmf-config/CommonSettings.php
1 file changed, 9 insertions(+), 1 deletion(-)

Approvals:
  CSteipp: Looks good to me, but someone else must approve
  Reedy: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 320a824..5f389d2 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -2839,7 +2839,7 @@
        $wgMWOAuthCentralWiki = 'mediawikiwiki';
        $wgMWOAuthSharedUserSource = 'CentralAuth';
        $wgMWOAuthSecureTokenTransfer = true;
-       $wgGroupPermissions['oauthadmin']['mwoauthmanageconsumer'] = true;
+
        $wgGroupPermissions['autoconfirmed']['mwoauthproposeconsumer'] = true;
        $wgGroupPermissions['autoconfirmed']['mwoauthupdateownconsumer'] = true;
 
@@ -2867,6 +2867,14 @@
        $wgMWOAuthGrantPermissions['editpage']['item-merge'] = true;
        $wgMWOAuthGrantPermissions['editpage']['property-term'] = true;
        $wgMWOAuthGrantPermissions['editpage']['item-redirect'] = true;
+
+       $wgExtensionFunctions[] = function() {
+               global $wgDBname, $wgMWOAuthCentralWiki;
+               if ( $wgDBname === $wgMWOAuthCentralWiki ) {
+                       // Only needed on the central wiki.
+                       
$wgGroupPermissions['oauthadmin']['mwoauthmanageconsumer'] = true;
+               }
+       };
 }
 
 if ( $wmgUsePetition ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If063a8ffc9989477f7307f6bd6be73d496eebd86
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Hoo man <h...@online.de>
Gerrit-Reviewer: CSteipp <cste...@wikimedia.org>
Gerrit-Reviewer: Reedy <re...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to