From: Alexandre Emsenhuber Date: Sun, 22 Jul 2012 20:14:21 +0000 (+0200) Subject: Fix permissions check to show "hide" buttons. X-Git-Tag: 1.31.0-rc.0~22744^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=4af0248a84dfec3c00a63334fa4cdd19b901f00e;p=lhc%2Fweb%2Fwiklou.git Fix permissions check to show "hide" buttons. 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 --- diff --git a/includes/specials/SpecialLog.php b/includes/specials/SpecialLog.php index 8e4205c7e1..8ab09768be 100644 --- a/includes/specials/SpecialLog.php +++ b/includes/specials/SpecialLog.php @@ -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; }