Prado\Security\TAuthorizationRule::isUserAllowed PHP 메소드

isUserAllowed() 공개 메소드

public isUserAllowed ( Prado\Security\IUser $user, $verb, $ip ) : integer
$user Prado\Security\IUser
리턴 integer 1 if the user is allowed, -1 if the user is denied, 0 if the rule does not apply to the user
    public function isUserAllowed(IUser $user, $verb, $ip)
    {
        if ($this->isVerbMatched($verb) && $this->isIpMatched($ip) && $this->isUserMatched($user) && $this->isRoleMatched($user)) {
            return $this->_action === 'allow' ? 1 : -1;
        } else {
            return 0;
        }
    }