mirror of https://github.com/mastodon/mastodon
Add option to block reports from domain (#8830)
parent
d5bfba3262
commit
fd5285658f
@ -1,10 +1,13 @@
|
||||
%tr
|
||||
%td.domain
|
||||
%td
|
||||
%samp= domain_block.domain
|
||||
%td.severity
|
||||
= t("admin.domain_blocks.severities.#{domain_block.severity}")
|
||||
%td.reject_media
|
||||
- if domain_block.reject_media? || domain_block.suspend?
|
||||
%i.fa.fa-check
|
||||
%td.reject_reports
|
||||
- if domain_block.reject_reports? || domain_block.suspend?
|
||||
%i.fa.fa-check
|
||||
%td
|
||||
= table_link_to 'undo', t('admin.domain_blocks.undo'), admin_domain_block_path(domain_block)
|
||||
|
@ -1,5 +1,5 @@
|
||||
%tr
|
||||
%td.domain
|
||||
%td
|
||||
%samp= email_domain_block.domain
|
||||
%td
|
||||
= table_link_to 'trash', t('admin.email_domain_blocks.delete'), admin_email_domain_block_path(email_domain_block), method: :delete
|
||||
|
@ -0,0 +1,17 @@
|
||||
require Rails.root.join('lib', 'mastodon', 'migration_helpers')
|
||||
|
||||
class AddRejectReportsToDomainBlocks < ActiveRecord::Migration[5.2]
|
||||
include Mastodon::MigrationHelpers
|
||||
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
safety_assured do
|
||||
add_column_with_default :domain_blocks, :reject_reports, :boolean, default: false, allow_null: false
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
remove_column :domain_blocks, :reject_reports
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue