mirror of
https://github.com/internetee/registry.git
synced 2025-08-06 01:35:10 +02:00
Registrant domain update confirmation
This commit is contained in:
parent
254849494f
commit
ee39181094
16 changed files with 236 additions and 10 deletions
|
@ -198,6 +198,15 @@ class Domain < ActiveRecord::Base
|
|||
true
|
||||
end
|
||||
|
||||
def registrant_delete_confirmable?(token)
|
||||
return false unless pending_delete?
|
||||
return false if registrant_verification_token.blank?
|
||||
return false if registrant_verification_asked_at.blank?
|
||||
return false if token.blank?
|
||||
return false if registrant_verification_token != token
|
||||
true
|
||||
end
|
||||
|
||||
def registrant_verification_asked?
|
||||
registrant_verification_asked_at.present? && registrant_verification_token.present?
|
||||
end
|
||||
|
@ -275,6 +284,15 @@ class Domain < ActiveRecord::Base
|
|||
name
|
||||
end
|
||||
|
||||
def pending_registrant_name
|
||||
return '' if pending_json.blank?
|
||||
return '' if pending_json['domain'].blank?
|
||||
return '' if pending_json['domain']['registrant_id'].blank?
|
||||
registrant = Registrant.find_by(id: pending_json['domain']['registrant_id'].last)
|
||||
registrant.try(:name)
|
||||
end
|
||||
|
||||
|
||||
# rubocop:disable Lint/Loop
|
||||
def generate_auth_info
|
||||
begin
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue