* 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.
This commit is contained in:
Brion Vibber 2005-12-25 19:55:34 +00:00
parent e69ea9b6d2
commit b58cb3f747
4 changed files with 8 additions and 2 deletions

View 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. to vanish mysteriously from time to time for files that didn't have metadata.
* Added 'PageRenderingHash' hook for changing the parser cache hash key * Added 'PageRenderingHash' hook for changing the parser cache hash key
from an extension that changes rendering based on nonstandard options. 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 === === Caveats ===

View file

@ -801,6 +801,7 @@ $wgGroupPermissions['bot' ]['autoconfirmed'] = true;
$wgGroupPermissions['sysop']['block'] = true; $wgGroupPermissions['sysop']['block'] = true;
$wgGroupPermissions['sysop']['createaccount'] = true; $wgGroupPermissions['sysop']['createaccount'] = true;
$wgGroupPermissions['sysop']['delete'] = 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']['editinterface'] = true;
$wgGroupPermissions['sysop']['import'] = true; $wgGroupPermissions['sysop']['import'] = true;
$wgGroupPermissions['sysop']['importupload'] = true; $wgGroupPermissions['sysop']['importupload'] = true;

View file

@ -644,7 +644,8 @@ END;
function getUndeleteLink() { function getUndeleteLink() {
global $wgUser, $wgTitle, $wgContLang, $action; global $wgUser, $wgTitle, $wgContLang, $action;
if( (($wgTitle->getArticleId() == 0) || ($action == "history")) && if( $wgUser->isAllowed( 'deletedhistory' ) &&
(($wgTitle->getArticleId() == 0) || ($action == "history")) &&
($n = $wgTitle->isDeleted() ) ) ($n = $wgTitle->isDeleted() ) )
{ {
if ( $wgUser->isAllowed( 'delete' ) ) { if ( $wgUser->isAllowed( 'delete' ) ) {

View file

@ -70,7 +70,7 @@ $wgSpecialPages = array(
'Allmessages' => new SpecialPage( 'Allmessages' ), 'Allmessages' => new SpecialPage( 'Allmessages' ),
'Log' => new SpecialPage( 'Log' ), 'Log' => new SpecialPage( 'Log' ),
'Blockip' => new SpecialPage( 'Blockip', 'block' ), 'Blockip' => new SpecialPage( 'Blockip', 'block' ),
'Undelete' => new SpecialPage( 'Undelete' ), 'Undelete' => new SpecialPage( 'Undelete', 'deletedhistory' ),
"Import" => new SpecialPage( "Import", 'import' ), "Import" => new SpecialPage( "Import", 'import' ),
'Lockdb' => new SpecialPage( 'Lockdb', 'siteadmin' ), 'Lockdb' => new SpecialPage( 'Lockdb', 'siteadmin' ),
'Unlockdb' => new SpecialPage( 'Unlockdb', 'siteadmin' ), 'Unlockdb' => new SpecialPage( 'Unlockdb', 'siteadmin' ),