Fix permissions check to show "hide" buttons.
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Sun, 22 Jul 2012 20:14:21 +0000 (22:14 +0200)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Mon, 23 Jul 2012 07:41:13 +0000 (09:41 +0200)
The 'deletedhistory' is needed to access Special:RevisionDelete
and LogEventsList already checks for that right, but not
Special:Log. This caused the user to see "Hide log entries"
buttons when they had the 'deletelogentry' but not the
'deletedhistory', which was not correct.

Change-Id: Ie6274b30ffb98e2376d14e6fcac525f901d14f3d

includes/specials/SpecialLog.php

index 8e4205c..8ab0976 100644 (file)
@@ -162,7 +162,7 @@ class SpecialLog extends SpecialPage {
 
        private function getRevisionButton( $formcontents ) {
                # 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' ) ) {
+               if ( !$this->getUser()->isAllowedAll( 'deletedhistory', 'deletelogentry' ) ) {
                        return $formcontents;
                }