From: zppix1 Date: Thu, 19 Jan 2017 02:37:17 +0000 (-0600) Subject: Remove "editusercssjs" user right X-Git-Tag: 1.31.0-rc.0~3533^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=0a6f7f5796c412512858c94909b9bf98cf55abdd;p=lhc%2Fweb%2Fwiklou.git Remove "editusercssjs" user right Deprecated since MediaWiki1.16 Change-Id: Ic9851d53affe0f4ece7a79f541ec5cb39133b109 --- diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29 index 4b7de886a9..4a2ea7d361 100644 --- a/RELEASE-NOTES-1.29 +++ b/RELEASE-NOTES-1.29 @@ -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 diff --git a/includes/Title.php b/includes/Title.php index 0db4094f7f..28db064f32 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -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 ]; diff --git a/includes/user/User.php b/includes/user/User.php index ef4537f059..e9f6dce4b2 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -146,7 +146,6 @@ class User implements IDBAccessObject { 'editmyuserjs', 'editmywatchlist', 'editsemiprotected', - 'editusercssjs', # deprecated 'editusercss', 'edituserjs', 'hideuser', diff --git a/languages/i18n/en.json b/languages/i18n/en.json index e08a439820..9bbadb1eb4 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -1226,7 +1226,6 @@ "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", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index 64ca14fc1b..219dc0fa9c 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -1413,7 +1413,6 @@ "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}}", diff --git a/maintenance/dictionary/mediawiki.dic b/maintenance/dictionary/mediawiki.dic index a2a06d2aa3..a073941895 100644 --- a/maintenance/dictionary/mediawiki.dic +++ b/maintenance/dictionary/mediawiki.dic @@ -1322,7 +1322,6 @@ edittoken edittools editurl editusercss -editusercssjs edituserjs edoe egrave diff --git a/tests/phpunit/includes/TitlePermissionTest.php b/tests/phpunit/includes/TitlePermissionTest.php index 9121178a46..e20cc7b12f 100644 --- a/tests/phpunit/includes/TitlePermissionTest.php +++ b/tests/phpunit/includes/TitlePermissionTest.php @@ -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',