mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 09:57:23 +02:00
Story #104525314 - set pendingDeleteConfirmation when verifed not yes and confirmation required
This commit is contained in:
parent
c55695d328
commit
6f162e3f77
1 changed files with 6 additions and 1 deletions
|
@ -482,8 +482,9 @@ class Domain < ActiveRecord::Base
|
|||
return true if pending_delete?
|
||||
self.epp_pending_delete = true # for epp
|
||||
|
||||
# TODO: if this were to ever return true, that would be wrong. EPP would report sucess pending
|
||||
return true unless registrant_verification_asked?
|
||||
set_pending_delete
|
||||
pending_delete_confirmation!
|
||||
save(validate: false) # should check if this did succeed
|
||||
|
||||
DomainMailer.pending_deleted(self).deliver_now
|
||||
|
@ -699,6 +700,10 @@ class Domain < ActiveRecord::Base
|
|||
statuses.include? DomainStatus::PENDING_DELETE_CONFIRMATION
|
||||
end
|
||||
|
||||
def pending_delete_confirmation!
|
||||
statuses << DomainStatus::PENDING_DELETE_CONFIRMATION unless pending_delete_prohibited?
|
||||
end
|
||||
|
||||
def pending_delete_prohibited?
|
||||
(statuses_was & [
|
||||
DomainStatus::CLIENT_DELETE_PROHIBITED,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue