mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 20:18:22 +02:00
Merge branch '110687814-update_values' into staging
This commit is contained in:
commit
1e19855c9d
7 changed files with 28 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue