mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 09:21:43 +02:00
added test and saving statuses into histroy field
This commit is contained in:
parent
622dba4f1c
commit
09eab21d2b
9 changed files with 34 additions and 183 deletions
|
@ -12,11 +12,11 @@ module Domain::RegistryLockable
|
|||
end
|
||||
|
||||
def apply_registry_lock
|
||||
# binding.pry
|
||||
return unless registry_lockable?
|
||||
return if locked_by_registrant?
|
||||
|
||||
transaction do
|
||||
self.admin_store_statuses_history = self.statuses
|
||||
self.statuses |= LOCK_STATUSES
|
||||
self.locked_by_registrant_at = Time.zone.now
|
||||
alert_registrar_lock_changes!(lock: true)
|
||||
|
@ -29,7 +29,7 @@ module Domain::RegistryLockable
|
|||
(statuses & [DomainStatus::PENDING_DELETE_CONFIRMATION,
|
||||
DomainStatus::PENDING_CREATE, DomainStatus::PENDING_UPDATE,
|
||||
DomainStatus::PENDING_DELETE, DomainStatus::PENDING_RENEW,
|
||||
DomainStatus::PENDING_TRANSFER, DomainStatus::FORCE_DELETE]).empty?
|
||||
DomainStatus::PENDING_TRANSFER]).empty?
|
||||
end
|
||||
|
||||
def locked_by_registrant?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue