diff --git a/CHANGELOG.md b/CHANGELOG.md index 04d4a0053..1e0e62e39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +02.06.2015 + +* Added possibility to overwrite legal document types at application.yml level. + 01.06.2015 * Added separate data update, all data migration locate at db/data, more info 'rake -T data' diff --git a/app/models/legal_document.rb b/app/models/legal_document.rb index 890abd3e0..0972767f7 100644 --- a/app/models/legal_document.rb +++ b/app/models/legal_document.rb @@ -2,7 +2,11 @@ class LegalDocument < ActiveRecord::Base include Versions # version/legal_document_version.rb belongs_to :documentable, polymorphic: true - TYPES = %w(pdf bdoc ddoc zip rar gz tar 7z odt doc docx) + if ENV['legal_document_types'].present? + TYPES = ENV['legal_document_types'].split(',').map(&:strip) + else + TYPES = %w(pdf bdoc ddoc zip rar gz tar 7z odt doc docx) + end attr_accessor :body diff --git a/config/application-example.yml b/config/application-example.yml index 5296f9f9d..b506ec9ba 100644 --- a/config/application-example.yml +++ b/config/application-example.yml @@ -33,6 +33,9 @@ contact_org_enabled: 'false' # Enable iptables counter updater # iptables_counter_enabled: 'true' +# Custom legal document types +# legal_document_types: "pdf,bdoc,ddoc,zip,rar,gz,tar,7z,odt,doc,docx" + # DEPP server configuration (both for Registrar/Registrant servers) show_ds_data_fields: 'false' default_nameservers_count: '2'