[MediaWiki-commits] [Gerrit] Only add the oauthadmin group on the central wiki - change (operations/mediawiki-config)

2014-10-28 Thread jenkins-bot (Code Review)
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


[MediaWiki-commits] [Gerrit] Only add the oauthadmin group on the central wiki - change (operations/mediawiki-config)

2014-10-26 Thread Hoo man (Code Review)
Hoo man has uploaded a new change for review.

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

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(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/22/168922/1

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index ec0927c..982c1aa 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: newchange
Gerrit-Change-Id: If063a8ffc9989477f7307f6bd6be73d496eebd86
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Hoo man h...@online.de

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