From: Andrew Garrett Date: Mon, 10 Sep 2007 08:10:48 +0000 (+0000) Subject: * (bug 8834) Split off permission for editing user JavaScript and CSS from editinterf... X-Git-Tag: 1.31.0-rc.0~51448 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=cc69b8bd8db08c4a1fcdff412680651715458b34;p=lhc%2Fweb%2Fwiklou.git * (bug 8834) Split off permission for editing user JavaScript and CSS from editinterface to a new permission key editusercssjs. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 482c35d66e..1f83f5a2af 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -40,6 +40,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN message. * (bug 8759) Fixed bug where rollback was allowed on protected pages for wikis where rollback is given to non-sysops. +* (bug 8834) Split off permission for editing user JavaScript and CSS from + editinterface to a new permission key editusercssjs. === API changes in 1.12 === diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index b83b5cf2b0..5479b4df67 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -264,7 +264,7 @@ $wgUrlProtocols = array( 'ftp://', 'irc://', 'gopher://', - 'telnet://', // Well if we're going to support the above.. -ævar + 'telnet://', // Well if we're going to support the above.. -ævar 'nntp://', // @bug 3808 RFC 1738 'worldwind://', 'mailto:', @@ -1062,6 +1062,7 @@ $wgGroupPermissions['sysop']['createaccount'] = true; $wgGroupPermissions['sysop']['delete'] = true; $wgGroupPermissions['sysop']['deletedhistory'] = true; // can view deleted history entries, but not see or restore the text $wgGroupPermissions['sysop']['editinterface'] = true; +$wgGroupPermissions['sysop']['editusercssjs'] = true; $wgGroupPermissions['sysop']['import'] = true; $wgGroupPermissions['sysop']['importupload'] = true; $wgGroupPermissions['sysop']['move'] = true; @@ -2133,7 +2134,7 @@ $wgBrowserBlackList = array( '/^Mozilla\/4\.[^ ]+ [^(]*?\((?!compatible).*; [UIN]/', /** - * MSIE on Mac OS 9 is teh sux0r, converts þ to , ð to , Þ to and Ð to + * MSIE on Mac OS 9 is teh sux0r, converts þ to , ð to , Þ to and Ð to * * Known useragents: * - Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC) diff --git a/includes/Title.php b/includes/Title.php index a8e6ff7fb1..e9f2e20c4e 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1135,7 +1135,7 @@ class Title { # XXX: this might be better using restrictions # XXX: Find a way to work around the php bug that prevents using $this->userCanEditCssJsSubpage() from working if( $this->isCssJsSubpage() - && !$user->isAllowed('editinterface') + && !$user->isAllowed('editusercssjs') && !preg_match('/^'.preg_quote($user->getName(), '/').'\//', $this->mTextform) ) { $errors[] = array('customcssjsprotected'); } @@ -1394,7 +1394,7 @@ class Title { */ public function userCanEditCssJsSubpage() { global $wgUser; - return ( $wgUser->isAllowed('editinterface') or preg_match('/^'.preg_quote($wgUser->getName(), '/').'\//', $this->mTextform) ); + return ( $wgUser->isAllowed('editusercssjs') or preg_match('/^'.preg_quote($wgUser->getName(), '/').'\//', $this->mTextform) ); } /**