Merge branch '110687814-update_values' into staging

This commit is contained in:
Stas 2016-03-02 19:25:28 +02:00
commit 1e19855c9d
7 changed files with 28 additions and 3 deletions

View file

@ -140,7 +140,7 @@ class Epp::Contact < Contact
end
# rubocop:disable Metrics/AbcSize
def update_attributes(frame)
def update_attributes(frame, current_user)
return super if frame.blank?
at = {}.with_indifferent_access
at.deep_merge!(self.class.attrs_from(frame.css('chg'), new_record: false))
@ -181,6 +181,9 @@ class Epp::Contact < Contact
end
end
self.upid = current_user.id if current_user
self.up_date = Time.zone.now
super(at)
end
# rubocop:enable Metrics/AbcSize

View file

@ -6,7 +6,6 @@ class Epp::Domain < Domain
attr_accessor :is_renewal, :is_transfer
before_validation :manage_permissions
def manage_permissions
return if is_admin # this bad hack for 109086524, refactor later
return true if is_transfer || is_renewal
@ -500,6 +499,9 @@ class Epp::Domain < Domain
# at[:statuses] += at_add[:domain_statuses_attributes]
self.upid = current_user.id if current_user
self.up_date = Time.zone.now
if registrant_id && registrant.code == frame.css('registrant')
throw :epp_error, {