Contact statuses and update_contact modified

This commit is contained in:
Andres Keskküla 2014-12-18 13:53:01 +02:00
parent c089544eae
commit 9c4f0a63a0
6 changed files with 107 additions and 3 deletions

View file

@ -10,7 +10,8 @@ module Epp::ContactsHelper
# FIXME: Update returns 2303 update multiple times
code = params_hash['epp']['command']['update']['update'][:id]
@contact = Contact.where(code: code).first
if update_rights? && stamp(@contact) && @contact.update_attributes(contact_and_address_attributes(:update))
#if update_rights? && stamp(@contact) && @contact.update_attributes(contact_and_address_attributes(:update))
if owner? && stamp(@contact) && @contact.update_attributes(contact_and_address_attributes(:update))
render 'epp/contacts/update'
else
contact_exists?(code)
@ -67,7 +68,8 @@ module Epp::ContactsHelper
def validate_contact_update_request
@ph = params_hash['epp']['command']['update']['update']
update_attrs_present?
xml_attrs_present?(@ph, [['id'], %w(authInfo pw)])
#xml_attrs_present?(@ph, [['id'], %w(authInfo pw)])
xml_attrs_present?(@ph, [['id']])
end
def contact_exists?(code)