Remove "editusercssjs" user right
authorzppix1 <support@zppixballee.com>
Thu, 19 Jan 2017 02:37:17 +0000 (20:37 -0600)
committerPaladox <thomasmulhall410@yahoo.com>
Tue, 11 Apr 2017 13:54:43 +0000 (14:54 +0100)
Deprecated since MediaWiki1.16

Change-Id: Ic9851d53affe0f4ece7a79f541ec5cb39133b109

RELEASE-NOTES-1.29
includes/Title.php
includes/user/User.php
languages/i18n/en.json
languages/i18n/qqq.json
maintenance/dictionary/mediawiki.dic
tests/phpunit/includes/TitlePermissionTest.php

index 4b7de88..4a2ea7d 100644 (file)
@@ -37,6 +37,8 @@ production.
   added to $wgExtraLanguageCodes instead.
 * (T161453) LocalisationCache will no longer use the temporary directory in it's
   fallback chain when trying to work out where to write the cache.
+* The user right 'editusercssjs' (deprecated in 1.16) was removed. Use
+  'editusercss' and 'edituserjs' in $wgGroupPermissions and elsewhere instead.
 
 === New features in 1.29 ===
 * (T5233) A cookie can now be set when a user is autoblocked, to track that user
index 0db4094..28db064 100644 (file)
@@ -2151,8 +2151,7 @@ class Title implements LinkTarget {
        private function checkCSSandJSPermissions( $action, $user, $errors, $rigor, $short ) {
                # Protect css/js subpages of user pages
                # XXX: this might be better using restrictions
-               # XXX: right 'editusercssjs' is deprecated, for backward compatibility only
-               if ( $action != 'patrol' && !$user->isAllowed( 'editusercssjs' ) ) {
+               if ( $action != 'patrol' ) {
                        if ( preg_match( '/^' . preg_quote( $user->getName(), '/' ) . '\//', $this->mTextform ) ) {
                                if ( $this->isCssSubpage() && !$user->isAllowedAny( 'editmyusercss', 'editusercss' ) ) {
                                        $errors[] = [ 'mycustomcssprotected', $action ];
index ef4537f..e9f6dce 100644 (file)
@@ -146,7 +146,6 @@ class User implements IDBAccessObject {
                'editmyuserjs',
                'editmywatchlist',
                'editsemiprotected',
-               'editusercssjs', # deprecated
                'editusercss',
                'edituserjs',
                'hideuser',
index e08a439..9bbadb1 100644 (file)
        "right-editsemiprotected": "Edit pages protected as \"{{int:protect-level-autoconfirmed}}\"",
        "right-editcontentmodel": "Edit the content model of a page",
        "right-editinterface": "Edit the user interface",
-       "right-editusercssjs": "Edit other users' CSS and JavaScript files",
        "right-editusercss": "Edit other users' CSS files",
        "right-edituserjs": "Edit other users' JavaScript files",
        "right-editmyusercss": "Edit your own user CSS files",
index 64ca14f..219dc0f 100644 (file)
        "right-editsemiprotected": "{{doc-right|editsemiprotected}}\nRefers to {{msg-mw|Protect-level-autoconfirmed}}.\n\nSee also:\n* {{msg-mw|Right-editeditorprotected}}\n* {{msg-mw|Right-editextendedsemiprotected}}\n* {{msg-mw|Right-editprotected}}\n* {{msg-mw|Right-editsemiprotected}}",
        "right-editcontentmodel": "{{doc-right|editcontentmodel}}",
        "right-editinterface": "{{doc-right|editinterface}}",
-       "right-editusercssjs": "{{doc-right|editusercssjs}}",
        "right-editusercss": "{{doc-right|editusercss}}\nSee also:\n* {{msg-mw|Right-editmyusercss}}",
        "right-edituserjs": "{{doc-right|edituserjs}}\nSee also:\n* {{msg-mw|Right-editmyuserjs}}",
        "right-editmyusercss": "{{doc-right|editmyusercss}}\nSee also:\n* {{msg-mw|Right-editusercss}}",
index a2a06d2..a073941 100644 (file)
@@ -1322,7 +1322,6 @@ edittoken
 edittools
 editurl
 editusercss
-editusercssjs
 edituserjs
 edoe
 egrave
index 9121178..e20cc7b 100644 (file)
@@ -518,11 +518,6 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
                        $this->title->getUserPermissionsErrors( 'bogus',
                                $this->user ) );
 
-               $this->setUserPerm( 'editusercssjs' );
-               $this->assertEquals( [ [ 'badaccess-group0' ] ],
-                       $this->title->getUserPermissionsErrors( 'bogus',
-                               $this->user ) );
-
                $this->setUserPerm( [ 'edituserjs', 'editusercss' ] );
                $this->assertEquals( [ [ 'badaccess-group0' ] ],
                        $this->title->getUserPermissionsErrors( 'bogus',