Allow import/export of instance-level domain blocks/allows (#1754)
* Allow import/export of instance-level domain blocks/allows. Fixes #15095 * Pacify circleci * Address simple code review feedback * Add headers to exported CSV * Extract common import/export functionality to AdminExportControllerConcern * Add additional fields to instance-blocked domain export * Address review feedback * Split instance domain block/allow import/export into separate pages/controllers * Address code review feedback * Pacify DeepSource * Work around Paperclip::HasAttachmentFile for Rails 6 * Fix deprecated API warning in export tests * Remove after_commit workaround
This commit is contained in:
@ -23,6 +23,10 @@ class DomainAllow < ApplicationRecord
|
||||
!rule_for(domain).nil?
|
||||
end
|
||||
|
||||
def allowed_domains
|
||||
select(:domain)
|
||||
end
|
||||
|
||||
def rule_for(domain)
|
||||
return if domain.blank?
|
||||
|
||||
|
Reference in New Issue
Block a user