mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 13:15:40 +02:00
Hash: select entries by keys
This commit is contained in:
parent
c23075fa19
commit
c58b4fb2e9
11 changed files with 201 additions and 141 deletions
|
@ -81,6 +81,11 @@ module Repp
|
|||
h = {}
|
||||
h[transfer_info_params[:id].match?(/\A[0-9]+\z/) ? :id : :name] = transfer_info_params[:id]
|
||||
@domain = Domain.find_by!(h)
|
||||
|
||||
validate_registrar_authorization
|
||||
end
|
||||
|
||||
def validate_registrar_authorization
|
||||
return if @domain.registrar == current_user.registrar
|
||||
return if @domain.transfer_code.eql?(request.headers['Auth-Code'])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue