mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 23:24:48 +02:00
Merge pull request #1848 from internetee/1844-delete-domains-with-update-prohibited
Allow domain deletion on *UpdateProhibited statuses
This commit is contained in:
commit
f16143f170
4 changed files with 57 additions and 4 deletions
|
@ -109,14 +109,12 @@ class DomainStatus < ApplicationRecord
|
|||
DELETE_PROHIBIT_STATES = [
|
||||
DomainStatus::CLIENT_DELETE_PROHIBITED,
|
||||
DomainStatus::SERVER_DELETE_PROHIBITED,
|
||||
DomainStatus::CLIENT_UPDATE_PROHIBITED,
|
||||
DomainStatus::SERVER_UPDATE_PROHIBITED,
|
||||
DomainStatus::PENDING_CREATE,
|
||||
DomainStatus::PENDING_RENEW,
|
||||
DomainStatus::PENDING_TRANSFER,
|
||||
DomainStatus::PENDING_UPDATE,
|
||||
DomainStatus::PENDING_DELETE
|
||||
]
|
||||
].freeze
|
||||
|
||||
def epp_code_map
|
||||
{
|
||||
|
|
|
@ -465,7 +465,7 @@ class Epp::Domain < Domain
|
|||
def update(frame, current_user, verify = true)
|
||||
return super if frame.blank?
|
||||
|
||||
if discarded?
|
||||
if discarded? || statuses_blocks_update?
|
||||
add_epp_error('2304', nil, nil, 'Object status prohibits operation')
|
||||
return
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue