components/AccessControl.php
public function beforeAction($action)
	{
		$user = Yii::$app->getUser();

		$controller = $action->controller;

		if ($controller->module !== null) {
			if ($user->checkAccess($this->getItemName($controller->module) . $this->separator . '*', $this->params)) {
				return true;
			}
		}

		if ($user->checkAccess($this->getItemName($controller) . $this->separator . '*', $this->params)) {
			return true;
		}

		if ($user->checkAccess($itemName = $this->getItemName($action), $this->params)) {
			return true;
		}

		if (isset($this->denyCallback)) {
			call_user_func($this->denyCallback, $itemName, $action);
		} else {
			$this->denyAccess($user);
		}
		return false;
	}
public function beforeAction($action)
	{
		$user = Yii::$app->getUser();

		$controller = $action->controller;

		if ($controller->module !== null) {
			if ($user->checkAccess($this->getItemName($controller->module) . $this->separator . '*', $this->params)) {
				return true;
			}
		}

		if ($user->checkAccess($this->getItemName($controller) . $this->separator . '*', $this->params)) {
			return true;
		}

		if ($user->checkAccess($itemName = $this->getItemName($action), $this->params)) {
			return true;
		}

		if (isset($this->denyCallback)) {
			call_user_func($this->denyCallback, $itemName, $action);
		} else {
			$this->denyAccess($user);
		}
		return false;
	}
This method is invoked right before an action is to be executed (after all possible filters.)
You may override this method to do last-minute preparation for the action.

@param Action $action the action to be executed.
@return boolean whether the action should continue to be executed.