Merge branch 'master' of github.com:internetee/registry

This commit is contained in:
Martin Lensment 2014-08-27 12:29:05 +03:00
commit 785ac5450f
2 changed files with 12 additions and 3 deletions

View file

@ -61,6 +61,7 @@ module Epp
## UPDATE
def validate_contact_update_request
@ph = params_hash['epp']['command']['update']['update']
update_attrs_present?
xml_attrs_present?(@ph, [['id']])
end
@ -70,6 +71,13 @@ module Epp
value: { obj: 'id', val: code } }
end
def update_attrs_present?
return true if parsed_frame.css('add').present?
return true if parsed_frame.css('rem').present?
return true if parsed_frame.css('chg').present?
epp_errors << { code: '2003', msg: I18n.t('errors.messages.required_parameter_missing', key: 'add, rem or chg') }
end
## DELETE
def validate_contact_delete_request
@ph = params_hash['epp']['command']['delete']['delete']