From d047725518772165f8717090030139eb4eafdb92 Mon Sep 17 00:00:00 2001 From: tsingsun Date: Wed, 6 Dec 2017 17:04:09 +0800 Subject: [PATCH] fix action check access bug --- src/GraphQLAction.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GraphQLAction.php b/src/GraphQLAction.php index 437114f..6033750 100644 --- a/src/GraphQLAction.php +++ b/src/GraphQLAction.php @@ -102,7 +102,7 @@ public function getGraphQLActions() $ret = array_merge($this->schemaArray[0], $this->schemaArray[1]); if (!$this->authActions) { //init - $this->authActions = array_keys(array_merge($this->schemaArray[0], $this->schemaArray[1])); + $this->authActions = array_merge($this->schemaArray[0], $this->schemaArray[1]); } return $ret; } @@ -123,7 +123,7 @@ public function run() { Yii::$app->response->format = Response::FORMAT_JSON; if ($this->authActions && $this->checkAccess) { - foreach ($this->authActions as $childAction) { + foreach ($this->authActions as $childAction => $class) { call_user_func($this->checkAccess, $childAction); } }