mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 23:24:48 +02:00
Do not send notification email on EPP contact:update if contact does not
act as a registrant Fixes #1161
This commit is contained in:
parent
6a61d7de5b
commit
6fbadaf7f8
4 changed files with 62 additions and 3 deletions
|
@ -548,4 +548,8 @@ class Contact < ActiveRecord::Base
|
|||
def managed_by?(registrant_user)
|
||||
ident == registrant_user.ident
|
||||
end
|
||||
|
||||
def registrant?
|
||||
registrant_domains.any?
|
||||
end
|
||||
end
|
||||
|
|
|
@ -179,7 +179,7 @@ class Epp::Contact < Contact
|
|||
old_email = email_was
|
||||
updated = save
|
||||
|
||||
if updated && email_changed
|
||||
if updated && email_changed && registrant?
|
||||
ContactMailer.email_changed(contact: self, old_email: old_email).deliver_now
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue