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;
}