mirror of
https://github.com/internetee/registry.git
synced 2025-05-16 17:37:17 +02:00
parent
c6bd590b38
commit
ff466e57ac
2 changed files with 8 additions and 8 deletions
|
@ -19,11 +19,11 @@ class Registrar
|
|||
ip_restriction = Authorization::RestrictedIP.new(request.ip)
|
||||
allowed = ip_restriction.can_access_registrar_area?(current_user.registrar)
|
||||
|
||||
unless allowed
|
||||
flash[:alert] = t('registrar.authorization.ip_not_allowed', ip: request.ip)
|
||||
sign_out current_user
|
||||
redirect_to registrar_login_url
|
||||
end
|
||||
return if allowed
|
||||
|
||||
flash[:alert] = t('registrar.authorization.ip_not_allowed', ip: request.ip)
|
||||
sign_out current_user
|
||||
redirect_to registrar_login_url
|
||||
end
|
||||
|
||||
def depp_controller?
|
||||
|
|
|
@ -153,9 +153,9 @@ class Registrar
|
|||
ip_restriction = Authorization::RestrictedIP.new(request.ip)
|
||||
allowed = ip_restriction.can_access_registrar_area_sign_in_page?
|
||||
|
||||
unless allowed
|
||||
render text: t('registrar.authorization.ip_not_allowed', ip: request.ip), status: :forbidden
|
||||
end
|
||||
return if allowed
|
||||
|
||||
render text: t('registrar.authorization.ip_not_allowed', ip: request.ip), status: :forbidden
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue