REPP: Verify contact ident type

This commit is contained in:
Karl Erik Õunapuu 2020-10-09 11:12:25 +03:00
parent 39c6d20413
commit a73cd53bff
No known key found for this signature in database
GPG key ID: C9DD647298A34764
3 changed files with 17 additions and 9 deletions

View file

@ -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