mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 12:08:27 +02:00
Contact statuses and update_contact modified
This commit is contained in:
parent
c089544eae
commit
9c4f0a63a0
6 changed files with 107 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue