Skip to content
This repository has been archived by the owner on Apr 27, 2022. It is now read-only.

Commit

Permalink
fix action check access bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tsingsun committed Dec 6, 2017
1 parent 8717a24 commit d047725
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/GraphQLAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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);
}
}
Expand Down

0 comments on commit d047725

Please sign in to comment.