mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 06:34:46 +02:00
Hide method
This commit is contained in:
parent
30ac973f96
commit
132ba8c6e2
2 changed files with 6 additions and 7 deletions
|
@ -358,12 +358,6 @@ class EppController < ApplicationController
|
|||
# rubocop: enable Metrics/CyclomaticComplexity
|
||||
# rubocop: enable Metrics/PerceivedComplexity
|
||||
|
||||
def iptables_counter_update
|
||||
return if ENV['iptables_counter_enabled'].blank? && ENV['iptables_counter_enabled'] != 'true'
|
||||
return if current_user.blank?
|
||||
counter_update(current_user.registrar_code, ENV['iptables_server_ip'])
|
||||
end
|
||||
|
||||
def resource
|
||||
name = self.class.to_s.sub("Epp::","").sub("Controller","").underscore.singularize
|
||||
instance_variable_get("@#{name}")
|
||||
|
@ -407,6 +401,12 @@ class EppController < ApplicationController
|
|||
epp_session.updated_at < (Time.zone.now - timeout)
|
||||
end
|
||||
|
||||
def iptables_counter_update
|
||||
return if ENV['iptables_counter_enabled'].blank? && ENV['iptables_counter_enabled'] != 'true'
|
||||
return if current_user.blank?
|
||||
counter_update(current_user.registrar_code, ENV['iptables_server_ip'])
|
||||
end
|
||||
|
||||
def counter_update(registrar_code, ip)
|
||||
counter_proc = "/proc/net/xt_recent/#{registrar_code}"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue