original_string: protected function authorizeOrgIp()
      {
          //special case: project user should have no restriction
          if ($this->project->getSuperAdminName() == $this->getLoginName()) {
              return true;
          }
  
          //In unit test REMOTE_ADDR is not available and will return null
          $request = $this->getRequest();
  
          // E.g. command line user
          if (! $request instanceof \Zend_Controller_Request_Http) {
              return true;
          }
  
          $remoteIp = $request->getServer('REMOTE_ADDR');
          if ($this->util->isAllowedIP($remoteIp, $this->getBaseOrganization()->getAllowedIpRanges())) {
              return true;
          }
  
          return $this->_('You are not allowed to login from this location.');
      }
code: protected function authorizeOrgIp()
      {
          //special case: project user should have no restriction
          if ($this->project->getSuperAdminName() == $this->getLoginName()) {
              return true;
          }
  
          //In unit test REMOTE_ADDR is not available and will return null
          $request = $this->getRequest();
  
          // E.g. command line user
          if (! $request instanceof \Zend_Controller_Request_Http) {
              return true;
          }
  
          $remoteIp = $request->getServer('REMOTE_ADDR');
          if ($this->util->isAllowedIP($remoteIp, $this->getBaseOrganization()->getAllowedIpRanges())) {
              return true;
          }
  
          return $this->_('You are not allowed to login from this location.');
      }
code_tokens: protected function authorizeOrgIp ( ) { //special case: project user should have no restriction if ( $ this -> project -> getSuperAdminName ( ) == $ this -> getLoginName ( ) ) { return true ; } //In unit test REMOTE_ADDR is not available and will return null $ request = $ this -> getRequest ( ) ; // E.g. command line user if ( ! $ request instanceof \ Zend_Controller_Request_Http ) { return true ; } $ remoteIp = $ request -> getServer ( 'REMOTE_ADDR' ) ; if ( $ this -> util -> isAllowedIP ( $ remoteIp , $ this -> getBaseOrganization ( ) -> getAllowedIpRanges ( ) ) ) { return true ; } return $ this -> _ ( 'You are not allowed to login from this location.' ) ; }
docstring: Checks if the user is allowed to login using the current IP address
  according to his BASE organization
  
  An adapter authorizes and if the end resultis boolean, string or array
  it is converted into a Zend\Authenticate\Result.
  
  @return mixed Zend\Authentication\Adapter\AdapterInterface|Zend\Authenticate\Result|boolean|string|array
docstring_tokens: Checks if the user is allowed to login using the current IP address according to his BASE organization