mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 02:39:37 +02:00
Create blocked domains #2564
This commit is contained in:
parent
cd277c25ed
commit
d93d43e75c
13 changed files with 254 additions and 80 deletions
|
@ -106,6 +106,7 @@ class Ability
|
|||
def admin
|
||||
customer_service
|
||||
can :manage, Setting
|
||||
can :manage, BlockedDomain
|
||||
can :manage, ZonefileSetting
|
||||
can :manage, DomainVersion
|
||||
can :manage, Pricelist
|
||||
|
|
5
app/models/blocked_domain.rb
Normal file
5
app/models/blocked_domain.rb
Normal file
|
@ -0,0 +1,5 @@
|
|||
class BlockedDomain < ActiveRecord::Base
|
||||
include Versions
|
||||
|
||||
after_initialize -> { self.names = [] if names.nil? }
|
||||
end
|
|
@ -62,7 +62,8 @@ class Epp::Domain < Domain
|
|||
],
|
||||
'2302' => [ # Object exists
|
||||
[:name_dirty, :taken, { value: { obj: 'name', val: name_dirty } }],
|
||||
[:name_dirty, :reserved, { value: { obj: 'name', val: name_dirty } }]
|
||||
[:name_dirty, :reserved, { value: { obj: 'name', val: name_dirty } }],
|
||||
[:name_dirty, :blocked, { value: { obj: 'name', val: name_dirty } }]
|
||||
],
|
||||
'2304' => [ # Object status prohibits operation
|
||||
[:base, :domain_status_prohibits_operation]
|
||||
|
|
4
app/models/version/blocked_domain_version.rb
Normal file
4
app/models/version/blocked_domain_version.rb
Normal file
|
@ -0,0 +1,4 @@
|
|||
class BlockedDomainVersion < PaperTrail::Version
|
||||
self.table_name = :log_blocked_domains
|
||||
self.sequence_name = :log_blocked_domains_id_seq
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue