This change adds a new permission ('deletelogentry') which is required to be able
to delete log entries.
It does not affect who can see deleted content.
Change-Id: I6b69919a1bdc502becc1ae4ac9169b8b0e85bfdc
* (bug 36783) Implement jQuery Promise interface in mediawiki.api module.
* Make dates in sortable tables sort according to the page content language
instead of the site content language
+* (bug 37926) Deleterevision will no longer allow users to delete log entries,
+ the new deletelogentry permission is required for this.
=== Bug fixes in 1.20 ===
* (bug 30245) Use the correct way to construct a log page title.
// Permission to export pages including linked pages regardless of $wgExportMaxLinkDepth
#$wgGroupPermissions['bureaucrat']['override-export-depth'] = true;
+#$wgGroupPermissions['sysop']['deletelogentry'] = true;
#$wgGroupPermissions['sysop']['deleterevision'] = true;
// To hide usernames from users and Sysops
#$wgGroupPermissions['suppress']['hideuser'] = true;
'delete',
'deletedhistory',
'deletedtext',
+ 'deletelogentry',
'deleterevision',
'edit',
'editinterface',
}
$del = '';
$user = $this->getUser();
- // Don't show useless checkbox to people who cannot hide revisions
+ // Don't show useless checkbox to people who cannot hide log entries
if( $user->isAllowed( 'deletedhistory' ) ) {
- if( $row->log_deleted || $user->isAllowed( 'deleterevision' ) ) {
+ if( $row->log_deleted || $user->isAllowed( 'deletelogentry' ) ) {
$canHide = $user->isAllowed( 'deleterevision' );
if ( $this->flags & self::USE_REVDEL_CHECKBOXES ) { // Show checkboxes instead of links.
if ( !self::userCan( $row, LogPage::DELETED_RESTRICTED, $user ) ) { // If event was hidden from sysops
}
private function getRevisionButton( $formcontents ) {
- # If the user doesn't have the ability to delete revisions, don't bother showing him/her the button.
- if ( !$this->getUser()->isAllowed( 'deleterevision' ) ) {
+ # If the user doesn't have the ability to delete log entries, don't bother showing him/her the button.
+ if ( !$this->getUser()->isAllowed( 'deletelogentry' ) ) {
return $formcontents;
}
'success' => 'revdelete-success',
'failure' => 'revdelete-failure',
'list-class' => 'RevDel_RevisionList',
+ 'permission' => 'deleterevision',
),
'archive' => array(
'check-label' => 'revdelete-hide-text',
'success' => 'revdelete-success',
'failure' => 'revdelete-failure',
'list-class' => 'RevDel_ArchiveList',
+ 'permission' => 'deleterevision',
),
'oldimage'=> array(
'check-label' => 'revdelete-hide-image',
'success' => 'revdelete-success',
'failure' => 'revdelete-failure',
'list-class' => 'RevDel_FileList',
+ 'permission' => 'deleterevision',
),
'filearchive' => array(
'check-label' => 'revdelete-hide-image',
'success' => 'revdelete-success',
'failure' => 'revdelete-failure',
'list-class' => 'RevDel_ArchivedFileList',
+ 'permission' => 'deleterevision',
),
'logging' => array(
'check-label' => 'revdelete-hide-name',
'success' => 'logdelete-success',
'failure' => 'logdelete-failure',
'list-class' => 'RevDel_LogList',
+ 'permission' => 'deletelogentry',
),
);
$output = $this->getOutput();
$user = $this->getUser();
- $this->mIsAllowed = $user->isAllowed('deleterevision'); // for changes
$this->setHeaders();
$this->outputHeader();
$request = $this->getRequest();
return;
}
$this->typeInfo = self::$allowedTypes[$this->typeName];
+ $this->mIsAllowed = $user->isAllowed( $this->typeInfo['permission'] );
# If we have revisions, get the title from the first one
# since they should all be from the same page. This allows
'right-writeapi' => 'Use of the write API',
'right-delete' => 'Delete pages',
'right-bigdelete' => 'Delete pages with large histories',
+'right-deletelogentry' => 'Delete and undelete specific log entries',
'right-deleterevision' => 'Delete and undelete specific revisions of pages',
'right-deletedhistory' => 'View deleted history entries, without their associated text',
'right-deletedtext' => 'View deleted text and changes between deleted revisions',
'right-writeapi' => '{{doc-right|writeapi}}',
'right-delete' => '{{doc-right|delete}}',
'right-bigdelete' => '{{doc-right|bigdelete}}',
+'right-deletelogentry' => '{{doc-right|deletelogentry}}
+This user right is part of the [[mw:RevisionDelete|RevisionDelete]] feature.
+It can be given to the group {{msg|group-sysop|pl=yes}}, although this right is disabled by default.
+
+See also
+* {{msg|right-suppressionlog|pl=yes}}
+* {{msg|right-hideuser|pl=yes}}
+* {{msg|right-suppressrevision|pl=yes}}
+* {{msg|right-deleterevision|pl=yes}}',
'right-deleterevision' => '{{doc-right|deleterevision}}
This user right is part of the [[mw:RevisionDelete|RevisionDelete]] feature.
It can be given to the group {{msg|group-sysop|pl=yes}}, although this right is disabled by default.
See also
* {{msg|right-suppressionlog|pl=yes}}
* {{msg|right-hideuser|pl=yes}}
-* {{msg|right-suppressrevision|pl=yes}}',
+* {{msg|right-suppressrevision|pl=yes}}
+* {{msg|right-deletelogentry|pl=yes}}',
'right-deletedhistory' => '{{doc-right|deletedhistory}}',
'right-deletedtext' => '{{doc-right|deletedtext}}',
'right-browsearchive' => '{{doc-right|browsearchive}}',
See also
* {{msg|right-suppressionlog|pl=yes}}
* {{msg|right-hideuser|pl=yes}}
+* {{msg|right-deletelogentry|pl=yes}}
* {{msg|right-deleterevision|pl=yes}}',
'right-suppressionlog' => '{{doc-right|suppressionlog}}
This user right is part of the [[mw:RevisionDelete|RevisionDelete]] feature.
See also
* {{msg|right-suppressrevision|pl=yes}}
* {{msg|right-hideuser|pl=yes}}
+* {{msg|right-deletelogentry|pl=yes}}
* {{msg|right-deleterevision|pl=yes}}',
'right-block' => '{{doc-right|block}}',
'right-blockemail' => '{{doc-right|blockemail}}',
See also
* {{msg|right-suppressionlog|pl=yes}}
* {{msg|right-suppressrevision|pl=yes}}
+* {{msg|right-deletelogentry|pl=yes}}
* {{msg|right-deleterevision|pl=yes}}',
'right-ipblock-exempt' => '{{doc-right|ipblock-exempt}}
This user automatically bypasses IP blocks, auto-blocks and range blocks - so I presume - but I am uncertain',
'right-writeapi',
'right-delete',
'right-bigdelete',
+ 'right-deletelogentry',
'right-deleterevision',
'right-deletedhistory',
'right-deletedtext',