mirror of
https://github.com/internetee/registry.git
synced 2025-07-02 01:03:35 +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
|
||||
|
||||
def pending_update_notification_for_new_registrant
|
||||
# NB! new registrant at this point
|
||||
registrant
|
||||
registrant # new registrant at this point
|
||||
subject(:pending_update_notification_for_new_registrant_subject)
|
||||
domain_info
|
||||
compose
|
||||
|
@ -30,16 +29,16 @@ class DomainMailModel
|
|||
end
|
||||
|
||||
def registrant_updated_notification_for_old_registrant
|
||||
registrant_pending
|
||||
registrant_old
|
||||
subject(:registrant_updated_notification_for_old_registrant_subject)
|
||||
registrant_name
|
||||
compose
|
||||
end
|
||||
|
||||
def pending_update_rejected_notification_for_new_registrant
|
||||
registrant_pending
|
||||
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
|
||||
compose
|
||||
end
|
||||
|
@ -92,10 +91,6 @@ class DomainMailModel
|
|||
@params[:recipient] = format @domain.registrant.email
|
||||
end
|
||||
|
||||
def registrant_name
|
||||
@params[:registrant_name] = @domain.registrant.name
|
||||
end
|
||||
|
||||
def registrant_pending
|
||||
@params[:recipient] = format @domain.pending_json['new_registrant_email']
|
||||
@params[:new_registrant_name] = @domain.pending_json['new_registrant_name']
|
||||
|
|
|
@ -503,6 +503,10 @@ class Epp::Domain < Domain
|
|||
preclean_pendings
|
||||
user = ApiUser.find(pending_json['current_user_id'])
|
||||
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)
|
||||
yield(self) if block_given? # need to skip statuses check here
|
||||
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
|
||||
return unless update(frame, user, false)
|
||||
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
|
||||
true
|
||||
end
|
||||
|
|
|
@ -3,7 +3,7 @@ Tere,
|
|||
Domeeni <%= @params[:name] %> registreerija vahetuse taotlus on kinnitatud ning andmed registris uuendatud.
|
||||
<br><br>
|
||||
Uued registreerija:<br>
|
||||
Nimi: <%= @params[:registrant_name] %>
|
||||
Nimi: <%= @params[:new_registrant_name] %>
|
||||
<br><br>
|
||||
Lugupidamisega<br>
|
||||
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.
|
||||
<br><br>
|
||||
New registrant:<br>
|
||||
Name: <%= @params[:registrant_name] %>
|
||||
Name: <%= @params[:new_registrant_name] %>
|
||||
<br><br>
|
||||
Best Regards,<br>
|
||||
Estonian Internet Foundation
|
||||
|
|
|
@ -3,7 +3,7 @@ Tere,
|
|||
Domeeni <%= @params[:name] %> registreerija vahetuse taotlus on kinnitatud ning andmed registris uuendatud.
|
||||
|
||||
Uued registreerija:
|
||||
Nimi: <%= @params[:registrant_name] %>
|
||||
Nimi: <%= @params[:new_registrant_name] %>
|
||||
|
||||
Lugupidamisega
|
||||
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.
|
||||
|
||||
New registrant:
|
||||
Name: <%= @params[:registrant_name] %>
|
||||
Name: <%= @params[:new_registrant_name] %>
|
||||
|
||||
Best Regards,
|
||||
Estonian Internet Foundation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue