r25720 - Code Review

From MediaWiki.org

Jump to: navigation, search
Repository:MediaWiki
Revision:r25719 | r25720 (on ViewVC) | r25721 >
Date:08:10, 10 September 2007
Author:werdna
Status:ok
Tags:
Comment:* (bug 8834) Split off permission for editing user JavaScript and CSS from editinterface to a new permission key editusercssjs.
Modified paths:

Diff [purge]

Index: trunk/phase3/includes/Title.php
===================================================================
--- trunk/phase3/includes/Title.php	(revision 25719)
+++ trunk/phase3/includes/Title.php	(revision 25720)
@@ -1135,7 +1135,7 @@
 		# 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 @@
 	 */
 	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) );
 	}
 
 	/**
Index: trunk/phase3/includes/DefaultSettings.php
===================================================================
--- trunk/phase3/includes/DefaultSettings.php	(revision 25719)
+++ trunk/phase3/includes/DefaultSettings.php	(revision 25720)
@@ -264,7 +264,7 @@
 	'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']['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 @@
 	'/^Mozilla\/4\.[^ ]+ [^(]*?\((?!compatible).*; [UIN]/',
 	
 	/**
-	 * MSIE on Mac OS 9 is teh sux0r, converts þ to <thorn>, ð to <eth>, Þ to <THORN> and Ð to <ETH>
+	 * MSIE on Mac OS 9 is teh sux0r, converts þ to <thorn>, ð to <eth>, Þ to <THORN> and Ð to <ETH>
 	 *
 	 * Known useragents:
 	 * - Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC)
Index: trunk/phase3/RELEASE-NOTES
===================================================================
--- trunk/phase3/RELEASE-NOTES	(revision 25719)
+++ trunk/phase3/RELEASE-NOTES	(revision 25720)
@@ -40,6 +40,8 @@
   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 ===
 

Follow-up revisions

RevisionCommit summaryAuthorDate
r25754Merged revisions 25607-25751 via svnmerge fromdavid23:02, 10 September 2007
Views
Toolbox