Hide method

#700
This commit is contained in:
Artur Beljajev 2018-02-14 02:42:00 +02:00
parent fc02e4ad8a
commit 93055acb3a
3 changed files with 8 additions and 11 deletions

View file

@ -115,14 +115,6 @@ class Epp::SessionsController < EppController
true
end
def connection_limit_ok?
epp_session_count = EppSession.where(user_id: @api_user.registrar.api_users.ids)
.where('updated_at >= ?', Time.zone.now - 1.second).count
return false if epp_session_count >= 4
true
end
def logout
unless signed_in?
epp_errors << {
@ -151,4 +143,12 @@ class Epp::SessionsController < EppController
def resource
@api_user
end
def connection_limit_ok?
epp_session_count = EppSession.where(user_id: @api_user.registrar.api_users.ids)
.where('updated_at >= ?', Time.zone.now - 1.second).count
return false if epp_session_count >= 4
true
end
end