From 21993f9a3ba8c5089d428c29625299ee33206d42 Mon Sep 17 00:00:00 2001 From: Sergey Shevchenko Date: Thu, 25 Nov 2021 00:27:31 +1300 Subject: [PATCH] fix: check general canView first `LeftAndMain::canView()` allows extensions to prohibit the admin section to appear through `alternateAccessCheck` hook --- src/MailgunAdmin.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/MailgunAdmin.php b/src/MailgunAdmin.php index b1c697d..2a763d6 100644 --- a/src/MailgunAdmin.php +++ b/src/MailgunAdmin.php @@ -629,6 +629,10 @@ public function IsAdmin() */ public function canView($member = null) { + if(!parent::canView($member)) { + return false; + } + $mailer = MailgunHelper::getMailer(); // Another custom mailer has been set if (!$mailer instanceof SwiftMailer) {