mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 17:28:18 +02:00
Allow ForceDelete status not to block domain update
This commit is contained in:
parent
d58abdaea1
commit
851a2d6a2a
3 changed files with 14 additions and 8 deletions
|
@ -116,12 +116,15 @@ class Domain < ApplicationRecord
|
|||
|
||||
attr_accessor :is_admin
|
||||
|
||||
validate :check_permissions, :unless => :is_admin
|
||||
def check_permissions
|
||||
return unless force_delete_scheduled?
|
||||
errors.add(:base, I18n.t(:object_status_prohibits_operation))
|
||||
false
|
||||
end
|
||||
# Removed to comply new ForceDelete procedure
|
||||
# at https://github.com/internetee/registry/issues/1428#issuecomment-570561967
|
||||
#
|
||||
# validate :check_permissions, :unless => :is_admin
|
||||
# def check_permissions
|
||||
# return unless force_delete_scheduled?
|
||||
# errors.add(:base, I18n.t(:object_status_prohibits_operation))
|
||||
# false
|
||||
# end
|
||||
|
||||
validates :nameservers, domain_nameserver: {
|
||||
min: -> { Setting.ns_min_count },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue