mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 01:33:36 +02:00
Story #109367018 - ensure that updated notice goes to old registrant, but names new registrant
This commit is contained in:
parent
515226042c
commit
783b792acf
4 changed files with 12 additions and 14 deletions
|
@ -15,8 +15,7 @@ class DomainMailModel
|
||||||
end
|
end
|
||||||
|
|
||||||
def pending_update_notification_for_new_registrant
|
def pending_update_notification_for_new_registrant
|
||||||
# NB! new registrant at this point
|
registrant # new registrant at this point
|
||||||
registrant
|
|
||||||
subject(:pending_update_notification_for_new_registrant_subject)
|
subject(:pending_update_notification_for_new_registrant_subject)
|
||||||
domain_info
|
domain_info
|
||||||
compose
|
compose
|
||||||
|
@ -30,16 +29,16 @@ class DomainMailModel
|
||||||
end
|
end
|
||||||
|
|
||||||
def registrant_updated_notification_for_old_registrant
|
def registrant_updated_notification_for_old_registrant
|
||||||
|
registrant_pending
|
||||||
registrant_old
|
registrant_old
|
||||||
subject(:registrant_updated_notification_for_old_registrant_subject)
|
subject(:registrant_updated_notification_for_old_registrant_subject)
|
||||||
registrant_name
|
|
||||||
compose
|
compose
|
||||||
end
|
end
|
||||||
|
|
||||||
def pending_update_rejected_notification_for_new_registrant
|
def pending_update_rejected_notification_for_new_registrant
|
||||||
registrant_pending
|
registrant_pending
|
||||||
subject(:pending_update_rejected_notification_for_new_registrant_subject)
|
subject(:pending_update_rejected_notification_for_new_registrant_subject)
|
||||||
@params[:deliver_emails] = true # trigger from que
|
@params[:deliver_emails] = true # triggered from que
|
||||||
@params[:registrar_name] = @domain.registrar.name
|
@params[:registrar_name] = @domain.registrar.name
|
||||||
compose
|
compose
|
||||||
end
|
end
|
||||||
|
@ -92,10 +91,6 @@ class DomainMailModel
|
||||||
@params[:recipient] = format @domain.registrant.email
|
@params[:recipient] = format @domain.registrant.email
|
||||||
end
|
end
|
||||||
|
|
||||||
def registrant_name
|
|
||||||
@params[:registrant_name] = @domain.registrant.name
|
|
||||||
end
|
|
||||||
|
|
||||||
def registrant_pending
|
def registrant_pending
|
||||||
@params[:recipient] = format @domain.pending_json['new_registrant_email']
|
@params[:recipient] = format @domain.pending_json['new_registrant_email']
|
||||||
@params[:new_registrant_name] = @domain.pending_json['new_registrant_name']
|
@params[:new_registrant_name] = @domain.pending_json['new_registrant_name']
|
||||||
|
|
|
@ -503,6 +503,10 @@ class Epp::Domain < Domain
|
||||||
preclean_pendings
|
preclean_pendings
|
||||||
user = ApiUser.find(pending_json['current_user_id'])
|
user = ApiUser.find(pending_json['current_user_id'])
|
||||||
frame = Nokogiri::XML(pending_json['frame'])
|
frame = Nokogiri::XML(pending_json['frame'])
|
||||||
|
|
||||||
|
self.deliver_emails = true # turn on email delivery
|
||||||
|
send_mail :registrant_updated_notification_for_old_registrant
|
||||||
|
|
||||||
statuses.delete(DomainStatus::PENDING_UPDATE)
|
statuses.delete(DomainStatus::PENDING_UPDATE)
|
||||||
yield(self) if block_given? # need to skip statuses check here
|
yield(self) if block_given? # need to skip statuses check here
|
||||||
self.save
|
self.save
|
||||||
|
@ -510,8 +514,7 @@ class Epp::Domain < Domain
|
||||||
::PaperTrail.whodunnit = user.id_role_username # updator str should be the request originator not the approval user
|
::PaperTrail.whodunnit = user.id_role_username # updator str should be the request originator not the approval user
|
||||||
return unless update(frame, user, false)
|
return unless update(frame, user, false)
|
||||||
clean_pendings!
|
clean_pendings!
|
||||||
self.deliver_emails = true # turn on email delivery
|
|
||||||
send_mail :registrant_updated_notification_for_old_registrant
|
|
||||||
send_mail :registrant_updated_notification_for_new_registrant
|
send_mail :registrant_updated_notification_for_new_registrant
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,7 +3,7 @@ Tere,
|
||||||
Domeeni <%= @params[:name] %> registreerija vahetuse taotlus on kinnitatud ning andmed registris uuendatud.
|
Domeeni <%= @params[:name] %> registreerija vahetuse taotlus on kinnitatud ning andmed registris uuendatud.
|
||||||
<br><br>
|
<br><br>
|
||||||
Uued registreerija:<br>
|
Uued registreerija:<br>
|
||||||
Nimi: <%= @params[:registrant_name] %>
|
Nimi: <%= @params[:new_registrant_name] %>
|
||||||
<br><br>
|
<br><br>
|
||||||
Lugupidamisega<br>
|
Lugupidamisega<br>
|
||||||
Eesti Interneti SA
|
Eesti Interneti SA
|
||||||
|
@ -15,7 +15,7 @@ Hi,
|
||||||
Process for changing registrant of the domain <%= @params[:name] %> has been approved and the data in the registry is updated.
|
Process for changing registrant of the domain <%= @params[:name] %> has been approved and the data in the registry is updated.
|
||||||
<br><br>
|
<br><br>
|
||||||
New registrant:<br>
|
New registrant:<br>
|
||||||
Name: <%= @params[:registrant_name] %>
|
Name: <%= @params[:new_registrant_name] %>
|
||||||
<br><br>
|
<br><br>
|
||||||
Best Regards,<br>
|
Best Regards,<br>
|
||||||
Estonian Internet Foundation
|
Estonian Internet Foundation
|
||||||
|
|
|
@ -3,7 +3,7 @@ Tere,
|
||||||
Domeeni <%= @params[:name] %> registreerija vahetuse taotlus on kinnitatud ning andmed registris uuendatud.
|
Domeeni <%= @params[:name] %> registreerija vahetuse taotlus on kinnitatud ning andmed registris uuendatud.
|
||||||
|
|
||||||
Uued registreerija:
|
Uued registreerija:
|
||||||
Nimi: <%= @params[:registrant_name] %>
|
Nimi: <%= @params[:new_registrant_name] %>
|
||||||
|
|
||||||
Lugupidamisega
|
Lugupidamisega
|
||||||
Eesti Interneti SA
|
Eesti Interneti SA
|
||||||
|
@ -15,7 +15,7 @@ Hi,
|
||||||
Process for changing registrant of the domain <%= @params[:name] %> has been approved and the data in the registry is updated.
|
Process for changing registrant of the domain <%= @params[:name] %> has been approved and the data in the registry is updated.
|
||||||
|
|
||||||
New registrant:
|
New registrant:
|
||||||
Name: <%= @params[:registrant_name] %>
|
Name: <%= @params[:new_registrant_name] %>
|
||||||
|
|
||||||
Best Regards,
|
Best Regards,
|
||||||
Estonian Internet Foundation
|
Estonian Internet Foundation
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue