lajax\translatemanager\Module::checkAccess PHP Method

checkAccess() public method

public checkAccess ( ) : boolean
return boolean whether the module can be accessed by the current user
    public function checkAccess()
    {
        $ip = Yii::$app->request->getUserIP();
        foreach ($this->allowedIPs as $filter) {
            if ($filter === '*' || $filter === $ip || ($pos = strpos($filter, '*')) !== false && !strncmp($ip, $filter, $pos)) {
                return true;
            }
        }
        Yii::warning('Access to Translate is denied due to IP address restriction. The requested IP is ' . $ip, __METHOD__);
        return false;
    }