mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 21:25:39 +02:00
Disallow domain renew for renewProhibited domains
This commit is contained in:
parent
7b6060b4fb
commit
c07b7bf7f2
1 changed files with 6 additions and 5 deletions
|
@ -306,11 +306,12 @@ class Domain < ApplicationRecord
|
|||
end
|
||||
|
||||
def renewable?
|
||||
blocking_statuses = [DomainStatus::DELETE_CANDIDATE, DomainStatus::PENDING_RENEW,
|
||||
DomainStatus::PENDING_TRANSFER, DomainStatus::DISPUTED,
|
||||
DomainStatus::PENDING_UPDATE, DomainStatus::PENDING_DELETE,
|
||||
DomainStatus::PENDING_DELETE_CONFIRMATION]
|
||||
return false if statuses.include_any? blocking_statuses
|
||||
disallowed = [DomainStatus::DELETE_CANDIDATE, DomainStatus::PENDING_RENEW,
|
||||
DomainStatus::PENDING_TRANSFER, DomainStatus::CLIENT_RENEW_PROHIBITED,
|
||||
DomainStatus::PENDING_UPDATE, DomainStatus::PENDING_DELETE,
|
||||
DomainStatus::PENDING_DELETE_CONFIRMATION, DomainStatus::SERVER_RENEW_PROHIBITED]
|
||||
|
||||
return false unless (statuses & disallowed).empty?
|
||||
return true unless Setting.days_to_renew_domain_before_expire != 0
|
||||
|
||||
# if you can renew domain at days_to_renew before domain expiration
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue