Yii2Debug::checkAccess PHP Method

checkAccess() public method

Check access rights.
public checkAccess ( ) : boolean
return boolean
    public function checkAccess()
    {
        if ($this->accessExpression !== null && !$this->evaluateExpression($this->accessExpression)) {
            return false;
        }
        $ip = Yii::app()->getRequest()->getUserHostAddress();
        foreach ($this->allowedIPs as $filter) {
            if ($filter === '*' || $filter === $ip || ($pos = strpos($filter, '*')) !== false && !strncmp($ip, $filter, $pos)) {
                return true;
            }
        }
        return false;
    }