]> cat aescling's git repositories - mastodon.git/commit
Allow import/export of instance-level domain blocks/allows (#1754)
authorLevi Bard <taktaktaktaktaktaktaktaktaktak@gmail.com>
Mon, 16 May 2022 07:29:01 +0000 (09:29 +0200)
committersingle-right-quote <11325618-aescling@users.noreply.gitlab.com>
Fri, 27 May 2022 03:49:42 +0000 (23:49 -0400)
commitdbf2dbd52cf2aea9f34c1fe98ab2827dc1fa33fb
tree925b2b9af8406ddb761220056e1d1fe1fe65e145
parentfc103c42a2049fd699701f36ffeb2d44b692fb9d
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
16 files changed:
app/controllers/admin/export_domain_allows_controller.rb [new file with mode: 0644]
app/controllers/admin/export_domain_blocks_controller.rb [new file with mode: 0644]
app/controllers/concerns/admin_export_controller_concern.rb [new file with mode: 0644]
app/models/admin/import.rb [new file with mode: 0644]
app/models/domain_allow.rb
app/validators/admin_import_validator.rb [new file with mode: 0644]
app/views/admin/export_domain_allows/new.html.haml [new file with mode: 0644]
app/views/admin/export_domain_blocks/new.html.haml [new file with mode: 0644]
app/views/admin/instances/index.html.haml
config/locales/en.yml
config/routes.rb
spec/controllers/admin/domain_allows_controller_spec.rb [new file with mode: 0644]
spec/controllers/admin/export_domain_allows_controller_spec.rb [new file with mode: 0644]
spec/controllers/admin/export_domain_blocks_controller_spec.rb [new file with mode: 0644]
spec/fixtures/files/domain_allows.csv [new file with mode: 0644]
spec/fixtures/files/domain_blocks.csv [new file with mode: 0644]