Nothing Special   »   [go: up one dir, main page]

r12241 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r12240‎ | r12241 | r12242 >
Date:19:55, 25 December 2005
Author:vibber
Status:old
Tags:
Comment:
* Add 'deletedhistory' permission key for ability to view deleted history
list via Special:Undelete. Default is off, replicating the 1.5 behavior,
but it can be turned back on for random users to replicate the previous
1.6 dev behavior.

Gotten a rash of requests lately to delete history items, which then still
show their forbidden details to the whole world. Until we get this sorted
out to be easier to work with, I'm disabling the view of deleted history
for non-sysops on wikimedia.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/Skin.php (modified) (history)
  • /trunk/phase3/includes/SpecialPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/DefaultSettings.php
@@ -801,6 +801,7 @@
802802 $wgGroupPermissions['sysop']['block'] = true;
803803 $wgGroupPermissions['sysop']['createaccount'] = true;
804804 $wgGroupPermissions['sysop']['delete'] = true;
 805+$wgGroupPermissions['sysop']['deletedhistory'] = true; // can view deleted history entries, but not see or restore the text
805806 $wgGroupPermissions['sysop']['editinterface'] = true;
806807 $wgGroupPermissions['sysop']['import'] = true;
807808 $wgGroupPermissions['sysop']['importupload'] = true;
Index: trunk/phase3/includes/Skin.php
@@ -644,7 +644,8 @@
645645
646646 function getUndeleteLink() {
647647 global $wgUser, $wgTitle, $wgContLang, $action;
648 - if( (($wgTitle->getArticleId() == 0) || ($action == "history")) &&
 648+ if( $wgUser->isAllowed( 'deletedhistory' ) &&
 649+ (($wgTitle->getArticleId() == 0) || ($action == "history")) &&
649650 ($n = $wgTitle->isDeleted() ) )
650651 {
651652 if ( $wgUser->isAllowed( 'delete' ) ) {
Index: trunk/phase3/includes/SpecialPage.php
@@ -70,7 +70,7 @@
7171 'Allmessages' => new SpecialPage( 'Allmessages' ),
7272 'Log' => new SpecialPage( 'Log' ),
7373 'Blockip' => new SpecialPage( 'Blockip', 'block' ),
74 - 'Undelete' => new SpecialPage( 'Undelete' ),
 74+ 'Undelete' => new SpecialPage( 'Undelete', 'deletedhistory' ),
7575 "Import" => new SpecialPage( "Import", 'import' ),
7676 'Lockdb' => new SpecialPage( 'Lockdb', 'siteadmin' ),
7777 'Unlockdb' => new SpecialPage( 'Unlockdb', 'siteadmin' ),
Index: trunk/phase3/RELEASE-NOTES
@@ -354,6 +354,10 @@
355355 to vanish mysteriously from time to time for files that didn't have metadata.
356356 * Added 'PageRenderingHash' hook for changing the parser cache hash key
357357 from an extension that changes rendering based on nonstandard options.
 358+* Add 'deletedhistory' permission key for ability to view deleted history
 359+ list via Special:Undelete. Default is off, replicating the 1.5 behavior,
 360+ but it can be turned back on for random users to replicate the previous
 361+ 1.6 dev behavior.
358362
359363
360364 === Caveats ===

Status & tagging log