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

Change subject: Revert "Grant 'editcontentmodel' permission to 'user' group"
......................................................................


Revert "Grant 'editcontentmodel' permission to 'user' group"

This reverts Iad834e75 / b43ac35351e70f3b6429cc527509ac33f52c6404

And updates a test case that depended upon it.

Change-Id: Ibf04e9d2ba8619c0c6bf535a9eeece82882e3615
(cherry picked from commit ca11e50aa00d044ce0f65596d34a2c1033ba3ace)
---
M RELEASE-NOTES-1.28
M includes/DefaultSettings.php
M tests/phpunit/includes/api/ApiEditPageTest.php
3 files changed, 7 insertions(+), 4 deletions(-)

Approvals:
  Thcipriani: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/RELEASE-NOTES-1.28 b/RELEASE-NOTES-1.28
index c3a91c4..b8ca681 100644
--- a/RELEASE-NOTES-1.28
+++ b/RELEASE-NOTES-1.28
@@ -29,9 +29,6 @@
 * When $EditSubmitButtonLabelPublish is true, MediaWiki will label the button
   to store-to-database-and-show-to-others as "Publish page"/"Publish changes";
   if false, the default, they will be "Save page"/"Save changes".
-* The 'editcontentmodel' permission is now granted to all logged-in users 
('user').
-  instead of just administrators ('sysop'). Documentation for this feature is
-  available at <https://www.mediawiki.org/wiki/Help:ChangeContentModel>.
 * $wgRevisionCacheExpiry is now set to one week by default instead of being 
disabled.
 
 === New features in 1.28 ===
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 3fb4670..73aa5eb 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -5082,7 +5082,6 @@
 $wgGroupPermissions['user']['sendemail'] = true;
 $wgGroupPermissions['user']['applychangetags'] = true;
 $wgGroupPermissions['user']['changetags'] = true;
-$wgGroupPermissions['user']['editcontentmodel'] = true;
 
 // Implicit group for accounts that pass $wgAutoConfirmAge
 $wgGroupPermissions['autoconfirmed']['autoconfirmed'] = true;
@@ -5113,6 +5112,7 @@
 $wgGroupPermissions['sysop']['editinterface'] = true;
 $wgGroupPermissions['sysop']['editusercss'] = true;
 $wgGroupPermissions['sysop']['edituserjs'] = true;
+$wgGroupPermissions['sysop']['editcontentmodel'] = true;
 $wgGroupPermissions['sysop']['import'] = true;
 $wgGroupPermissions['sysop']['importupload'] = true;
 $wgGroupPermissions['sysop']['move'] = true;
diff --git a/tests/phpunit/includes/api/ApiEditPageTest.php 
b/tests/phpunit/includes/api/ApiEditPageTest.php
index 02d0a0d..d21d498 100644
--- a/tests/phpunit/includes/api/ApiEditPageTest.php
+++ b/tests/phpunit/includes/api/ApiEditPageTest.php
@@ -25,6 +25,12 @@
                        'wgContLang' => $wgContLang,
                ] );
 
+               // Make sure 'user' can edit content model
+               $this->mergeMwGlobalArrayValue(
+                       'wgGroupPermissions',
+                       [ 'user' => [ 'editcontentmodel' => true ] ]
+               );
+
                $wgExtraNamespaces[12312] = 'Dummy';
                $wgExtraNamespaces[12313] = 'Dummy_talk';
                $wgExtraNamespaces[12314] = 'DummyNonText';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibf04e9d2ba8619c0c6bf535a9eeece82882e3615
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.28.0-wmf.20
Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: Chad <ch...@wikimedia.org>
Gerrit-Reviewer: Thcipriani <tcipri...@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