From 7600660526423e580b2c86b5b28026c2fc8101c3 Mon Sep 17 00:00:00 2001 From: forecho Date: Fri, 25 Sep 2015 16:57:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DBUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AccessControl.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/components/AccessControl.php b/src/components/AccessControl.php index 42cf16f..e64ffc6 100644 --- a/src/components/AccessControl.php +++ b/src/components/AccessControl.php @@ -4,6 +4,7 @@ use yii\web\ForbiddenHttpException; use Yii; +use yii\base\Module; use yii\web\User; use yii\di\Instance; @@ -68,4 +69,15 @@ protected function denyAccess($user) } } + /** + * @inheritdoc + */ + protected function isActive($action) + { + $uniqueId = $action->getUniqueId(); + if ($uniqueId === Yii::$app->getErrorHandler()->errorAction) { + return false; + } + return true; + } } \ No newline at end of file