mirror of
https://github.com/internetee/registry.git
synced 2025-06-05 20:27:30 +02:00
REPP: Verify contact ident type
This commit is contained in:
parent
39c6d20413
commit
a73cd53bff
3 changed files with 17 additions and 9 deletions
|
@ -46,7 +46,7 @@ module Repp
|
|||
end
|
||||
|
||||
def ip_whitelisted?
|
||||
return false unless @api_user.registrar.api_ip_white?(request.ip)
|
||||
return false unless current_user.registrar.api_ip_white?(request.ip)
|
||||
end
|
||||
|
||||
def basic_token
|
||||
|
@ -70,7 +70,6 @@ module Repp
|
|||
|
||||
return if allowed
|
||||
|
||||
flash[:alert] = t('registrar.authorization.ip_not_allowed', ip: request.ip)
|
||||
render(json: { errors: [{ base: [I18n.t('registrar.authorization.ip_not_allowed', ip: request.ip)] }] }, status: :unauthorized)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue