Return true for a mapped action so that AuthComponent doesn't skip
authentication / authorization for that action.

@param string $action Action name
@return bool True is action is mapped and enabled.
495832
public function isAction($action)
    {
        $isAction = parent::isAction($action);
        if ($isAction) {
            return true;
        }

        if ($this->_isActionMapped()) {
            return true;
        }

        return false;
    }
644172
protected function checkAccess($action = null)
    {
        $allowed = false;

        $ip = Yii::$app->getRequest()->getUserIP();
        foreach ($this->allowedIPs as $filter) {
            if ($filter === '*' || $filter === $ip || (($pos = strpos($filter, '*')) !== false && !strncmp($ip, $filter, $pos))) {
                $allowed = true;
                break;
            }
        }
        if ($allowed === false) {
            foreach ($this->allowedHosts as $hostname) {
                $filter = gethostbyname($hostname);
                if ($filter === $ip) {
                    $allowed = true;
                    break;
                }
            }
        }
        if ($allowed === false) {
            if (!$this->disableIpRestrictionWarning) {
                Yii::warning('Access to debugger is denied due to IP address restriction. The requesting IP address is ' . $ip, __METHOD__);
            }

            return false;
        }

        if ($this->checkAccessCallback !== null && call_user_func($this->checkAccessCallback, $action) !== true) {
            if (!$this->disableCallbackRestrictionWarning) {
                Yii::warning('Access to debugger is denied due to checkAccessCallback.', __METHOD__);
            }

            return false;
        }

        return true;
    }
1208924
public function beforeAction($action)
    {
        if (!parent::beforeAction($action)) {
            return false;
        }
        switch ($action->id) {
        case 'index':
        case 'profile':
        case 'profilePicture':
            if (Yii::$app->user->isGuest) {
                $this->redirect(['login']);

                return false;
            }
            break;
        case 'login':
        case 'recovery':
            if ($action->id === 'recovery' && !$this->module->recoveryEnabled) {
                throw new AccessDeniedHttpException(Yii::t('usr', 'Password recovery has not been enabled.'));
            }
            if (!Yii::$app->user->isGuest) {
                $this->goBack();

                return false;
            }
            break;
        case 'register':
            if (!$this->module->registrationEnabled) {
                throw new AccessDeniedHttpException(Yii::t('usr', 'Registration has not been enabled.'));
            }
            if (!Yii::$app->user->isGuest) {
                $this->redirect(['profile']);

                return false;
            }
            break;
        case 'verify':
            if (!isset($_GET['activationKey'])) {
                throw new BadRequestHttpException(Yii::t('usr', 'Activation key is missing.'));
            }
            break;
        }

        return true;
    }
547166
protected function redirectToAction($action)
    {
        return $this->response->redirect([
            'for' => $this->router->getMatchedRoute()->getName(),
            'action' => $action
        ]);
    }
998090
public function hasAction($action)
    {
        if ($action == 'index') {
            return true;
        }

        // Don't allow access to any non-public methods (inspect instance plus all extensions)
        $insts = array_merge([$this], (array) $this->getExtensionInstances());
        foreach ($insts as $inst) {
            if (!method_exists($inst, $action)) {
                continue;
            }
            $r = new ReflectionClass(get_class($inst));
            $m = $r->getMethod($action);
            if (!$m || !$m->isPublic()) {
                return false;
            }
        }

        $action  = strtolower($action);
        $actions = $this->allowedActions();

        // Check if the action is defined in the allowed actions of any ancestry class
        // as either a key or value. Note that if the action is numeric, then keys are not
        // searched for actions to prevent actual array keys being recognised as actions.
        if (is_array($actions)) {
            $isKey   = !is_numeric($action) && array_key_exists($action, $actions);
            $isValue = in_array($action, $actions, true);
            if ($isKey || $isValue) {
                return true;
            }
        }

        $actionsWithoutExtra = $this->config()->get('allowed_actions', true);
        if (!is_array($actions) || !$actionsWithoutExtra) {
            if (!in_array(strtolower($action), ['run', 'doinit']) && method_exists($this, $action)) {
                return true;
            }
        }

        return false;
    }
307902
public function userAllowed($action)
    {
        if (user()->isAdmin()) {
            return true;
        }

        $this->_loadPermissions();
        $allowedRoles = $this->_permissions
            ->filter(function ($rule) use ($action) {
                return $rule->get('action') == $action;
            })
            ->extract('role_id')
            ->toArray();
        $intersect = array_intersect($allowedRoles, user()->get('role_ids'));

        return !empty($intersect);
    }
126271
public function action($action)
    {
        $a = func_get_args();
        $controllerPath = $this->controller->getControllerActionPath();
        array_unshift($a, $controllerPath);
        $ret = call_user_func_array([$this, 'url'], $a);

        return $ret;
    }
491559
protected function action($action)
    {
        $action = in_array($action, $this->actions) ? $action : null;
        $action = array_key_exists($action, $this->aliases) ? $this->aliases[$action] : $action;

        return $action;
    }
1372677
public function hasAction($controller, $action = null)
    {
        if ($action === null) {
            list($controller, $action) = explode('.', $controller);
        }
        return in_array("{$controller}.{$action}", $this->action_names);
    }
499993
protected function routingToController($action)
	{
		if ($action instanceof Closure) return false;

		return is_string($action) || is_string(array_get($action, 'uses'));
	}
1226752
public function beforeAction($action)
    {
        $itemName = '';
        $controller = $action->controller;

        /**
         * @var \yii\web\User $user
         */
        $user = \Yii::$app->getUser();

        if ($user->isGuest) {
            $user->loginRequired();
        }

        if (($module = $controller->module) !== null) {
            $itemName .= $module->id . '.';
            if ($user->can($itemName . '*')) {
                return true;
            }
        }

        $itemName .= $controller->id;
        if ($user->can($itemName . '.*')) {
            return true;
        }

        $itemName .= '.' . $action->id;
        if ($user->can($itemName, $this->params)) {
            return true;
        }

        throw new HttpException(401, \Yii::t('yii', 'You are not permission to perform this action.'));
    }
1340701
public static function handleFilter($action = '')
    {
        if (!$action) {
            return true;
        }

        if (self::hasFilter($action)) {
            $callback = self::$filters[$action];
            return $callback();
        }

        return false;
    }
1298844
public function actionIsValidationExempt($action)
    {
        // Non-actions don't bypass validation
        if (!$action) {
            return false;
        }
        if ($action->getValidationExempt()) {
            return true;
        }
        if (in_array($action->actionName(), $this->getValidationExemptActions())) {
            return true;
        }
        return false;
    }
947649
public function beforeAction($action)
    {
        if (parent::beforeAction($action)) {
            if (!extension_loaded('pcntl')) {
                $this->stderr("Pcntl extension is not loaded.If you don't want to handle process signal, please set {handleSignal} to false" . PHP_EOL);
                exit;
            }
            $this->parseFullName();
            declare(ticks = 1);
            pcntl_signal(SIGTERM, [$this, 'signalHandler']);
            pcntl_signal(SIGHUP, [$this, 'signalHandler']);
            pcntl_signal(SIGINT, [$this, 'signalHandler']);

            return true;
        }
        return false;
    }
576450
protected function getStatusByAction($action)
    {
        $status = null;
        switch ($action) {
            case 'void':
                $status = $this->getSuggestStatusOnVoid();
                break;
            case 'refund_partial':
            case 'reauthorize':
                $status = $this->getOrder()->getPaymentStatus();
                break;
            case 'refund':
            case 'capture':
            case 'capture_partial':
                $status = 'completed';
                break;
            default:
                $status = 'completed';
        }

        return $status;
    }
1139356
public function _canExecute($action)
    {
        $viewer = get_viewer();

        if ($viewer->hasSubscription()) {
            $ret = $this->getItem()->authorize('upgradepackage');
        } else {
            $ret = $this->getItem()->authorize('subscribepackage');
        }

        return $ret;
    }
470670
public function passesOrFail($action = null)
    {
        if(  !$this->passes($action) ){
            throw new ValidatorException( $this->errorsBag() );
        }

        return true;
    }