code: private function isAllowed($ip, $cidr)
      {
          if (empty($this->ranges)) {
              return true;
          }
  
          foreach ($this->ranges as $string) {
              list($isNegated, $range) = $this->parseNegatedRange($string);
              if ($this->inRange($ip, $cidr, $range)) {
                  return !$isNegated;
              }
          }
  
          return false;
      }
docs: The method checks whether the IP address with specified CIDR is allowed according to the [[ranges]] list.
  
  @param string $ip
  @param int $cidr
  @return bool
  @see ranges