PHP Codeigniter REST Api limit not working -


i have similar issue this one since no 1 answered reposting question, dont see errors or limits not working, tried debug rest_controller, problem on line 695

// doing key related stuff? can if have key right?     if ($this->config->item('rest_enable_keys') && empty($this->rest->key) === false)     {         // check limit         if ($this->config->item('rest_enable_limits') && $this->_check_limit($controller_method) === false)         {             $response = [$this->config->item('rest_status_field_name') => false, $this->config->item('rest_message_field_name') => $this->lang->line('text_rest_api_key_time_limit')];             $this->response($response, self::http_unauthorized);         }          // if no level set use 0, aren't using permissions         $level = isset($this->methods[$controller_method]['level']) ? $this->methods[$controller_method]['level'] : 0;          // if no level set, or lower than/equal key's level         $authorized = $level <= $this->rest->level;         // im tellin!         if ($this->config->item('rest_enable_logging') && $log_method)         {             $this->_log_request($authorized);         }         if($authorized === false)         {             // don't have enough perms             $response = [$this->config->item('rest_status_field_name') => false, $this->config->item('rest_message_field_name') => $this->lang->line('text_rest_api_key_permissions')];             $this->response($response, self::http_unauthorized);         }     } 

this condition false

empty($this->rest->key) === false 

what should make work? in advance


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -