mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 16:32:04 +02:00
Registrant domain update confirmation
This commit is contained in:
parent
254849494f
commit
ee39181094
16 changed files with 236 additions and 10 deletions
|
@ -1,5 +1,28 @@
|
|||
# Used in Registrant portal to collect registrant verifications
|
||||
# Registrant postgres user can access this table directly.
|
||||
class RegistrantVerification < ActiveRecord::Base
|
||||
validates :verification_token, :domain_name, presence: true
|
||||
# actions
|
||||
CONFIRMED = 'confirmed'
|
||||
REJECTED = 'rejected'
|
||||
|
||||
# action types
|
||||
DOMAIN_REGISTRANT_CHANGE = 'domain_registrant_change'
|
||||
DOMAIN_DELETE = 'domain_delete'
|
||||
|
||||
belongs_to :domain
|
||||
|
||||
validates :verification_token, :domain_name, :domain, :action, :action_type, presence: true
|
||||
validates :domain, uniqueness: { scope: [:domain_id, :verification_token] }
|
||||
|
||||
def domain_registrant_change_confirm!
|
||||
self.action_type = DOMAIN_REGISTRANT_CHANGE
|
||||
self.action = CONFIRMED
|
||||
save
|
||||
end
|
||||
|
||||
def domain_registrant_change_reject!
|
||||
self.action_type = DOMAIN_REGISTRANT_CHANGE
|
||||
self.action = REJECTED
|
||||
save
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue