EPP transfer request improvements

This commit is contained in:
Martin Lensment 2014-09-19 13:22:10 +03:00
parent 2d2a12b7d0
commit d5954239da
10 changed files with 56 additions and 5 deletions

View file

@ -136,7 +136,13 @@ module Epp::DomainsHelper
## TRANSFER
def validate_domain_transfer_request
@ph = params_hash['epp']['command']['transfer']['transfer']
xml_attrs_present?(@ph, [['name']])
attrs_present = xml_attrs_present?(@ph, [['name']])
return false unless attrs_present
op = parsed_frame.css('transfer').first[:op]
return true if %w(approve query).include?(op)
epp_errors << { code: '2306', msg: I18n.t('errors.messages.attribute_op_is_invalid') }
false
end
## DELETE