Add option to block reports from domain (#8830)
parent
d5bfba3262
commit
fd5285658f
@ -1,10 +1,13 @@
|
|||||||
%tr
|
%tr
|
||||||
%td.domain
|
%td
|
||||||
%samp= domain_block.domain
|
%samp= domain_block.domain
|
||||||
%td.severity
|
%td.severity
|
||||||
= t("admin.domain_blocks.severities.#{domain_block.severity}")
|
= t("admin.domain_blocks.severities.#{domain_block.severity}")
|
||||||
%td.reject_media
|
%td.reject_media
|
||||||
- if domain_block.reject_media? || domain_block.suspend?
|
- if domain_block.reject_media? || domain_block.suspend?
|
||||||
%i.fa.fa-check
|
%i.fa.fa-check
|
||||||
|
%td.reject_reports
|
||||||
|
- if domain_block.reject_reports? || domain_block.suspend?
|
||||||
|
%i.fa.fa-check
|
||||||
%td
|
%td
|
||||||
= table_link_to 'undo', t('admin.domain_blocks.undo'), admin_domain_block_path(domain_block)
|
= table_link_to 'undo', t('admin.domain_blocks.undo'), admin_domain_block_path(domain_block)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
%tr
|
%tr
|
||||||
%td.domain
|
%td
|
||||||
%samp= email_domain_block.domain
|
%samp= email_domain_block.domain
|
||||||
%td
|
%td
|
||||||
= table_link_to 'trash', t('admin.email_domain_blocks.delete'), admin_email_domain_block_path(email_domain_block), method: :delete
|
= 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