Story #104525314 - fix:admin could not confirm reject pending, refactor registrant confirm

This commit is contained in:
Matt Farnsworth 2015-11-06 11:15:05 +02:00
parent 95bf081b53
commit 3d7f8e2866

View file

@ -449,6 +449,7 @@ class Domain < ActiveRecord::Base
# rubocop: disable Metrics/CyclomaticComplexity
def registrant_update_confirmable?(token)
return true if Rails.env.development?
return false if (statuses & [DomainStatus::FORCE_DELETE, DomainStatus::DELETE_CANDIDATE]).any?
return false unless pending_update?
return false if registrant_verification_token.blank?
return false if registrant_verification_asked_at.blank?
@ -698,7 +699,7 @@ class Domain < ActiveRecord::Base
end
def pending_delete?
statuses.include?(DomainStatus::PENDING_DELETE) && !statuses.include?(DomainStatus::FORCE_DELETE)
(statuses & [DomainStatus::PENDING_DELETE_CONFIRMATION, DomainStatus::PENDING_DELETE]).any?
end
def pending_delete_confirmation?