mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 13:15:40 +02:00
parent
fc02e4ad8a
commit
93055acb3a
3 changed files with 8 additions and 11 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue