* Add 'deletedhistory' permission key for ability to view deleted history
authorBrion Vibber <brion@users.mediawiki.org>
Sun, 25 Dec 2005 19:55:34 +0000 (19:55 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sun, 25 Dec 2005 19:55:34 +0000 (19:55 +0000)
  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.

RELEASE-NOTES
includes/DefaultSettings.php
includes/Skin.php
includes/SpecialPage.php

index 29f4d0a..4b53622 100644 (file)
@@ -354,6 +354,10 @@ fully support the editing toolbar, but was found to be too confusing.
   to vanish mysteriously from time to time for files that didn't have metadata.
 * Added 'PageRenderingHash' hook for changing the parser cache hash key
   from an extension that changes rendering based on nonstandard options.
+* 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.
 
 
 === Caveats ===
index e875cc4..0b94200 100644 (file)
@@ -801,6 +801,7 @@ $wgGroupPermissions['bot'  ]['autoconfirmed']   = true;
 $wgGroupPermissions['sysop']['block']           = true;
 $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']['import']          = true;
 $wgGroupPermissions['sysop']['importupload']    = true;
index 84b7957..c446f0e 100644 (file)
@@ -644,7 +644,8 @@ END;
 
        function getUndeleteLink() {
                global $wgUser, $wgTitle, $wgContLang, $action;
-               if(     (($wgTitle->getArticleId() == 0) || ($action == "history")) &&
+               if(     $wgUser->isAllowed( 'deletedhistory' ) &&
+                       (($wgTitle->getArticleId() == 0) || ($action == "history")) &&
                        ($n = $wgTitle->isDeleted() ) ) 
                {
                        if ( $wgUser->isAllowed( 'delete' ) ) {
index 38c2e42..c7caa3c 100644 (file)
@@ -70,7 +70,7 @@ $wgSpecialPages = array(
        'Allmessages'   => new SpecialPage( 'Allmessages' ),
        'Log'           => new SpecialPage( 'Log' ),
        'Blockip'               => new SpecialPage( 'Blockip', 'block' ),
-       'Undelete'              => new SpecialPage( 'Undelete' ),
+       'Undelete'              => new SpecialPage( 'Undelete', 'deletedhistory' ),
        "Import"                => new SpecialPage( "Import", 'import' ),
        'Lockdb'                => new SpecialPage( 'Lockdb', 'siteadmin' ),
        'Unlockdb'              => new SpecialPage( 'Unlockdb', 'siteadmin' ),