diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/admin/accounts_controller.rb | 16 | ||||
-rw-r--r-- | app/controllers/admin/domain_blocks_controller.rb | 4 |
2 files changed, 17 insertions, 3 deletions
diff --git a/app/controllers/admin/accounts_controller.rb b/app/controllers/admin/accounts_controller.rb index d486a97ba..9054a8aca 100644 --- a/app/controllers/admin/accounts_controller.rb +++ b/app/controllers/admin/accounts_controller.rb @@ -2,7 +2,7 @@ module Admin class AccountsController < BaseController - before_action :set_account, only: [:show, :redownload, :remove_avatar, :remove_header, :enable, :allow_public, :allow_nonsensitive, :unsilence, :unsuspend, :memorialize, :approve, :reject] + before_action :set_account, only: [:show, :redownload, :remove_avatar, :remove_header, :enable, :mark_known, :mark_unknown, :allow_public, :allow_nonsensitive, :unsilence, :unsuspend, :memorialize, :approve, :reject] before_action :require_remote_account!, only: [:redownload] before_action :require_local_account!, only: [:enable, :memorialize, :approve, :reject] @@ -45,6 +45,20 @@ module Admin redirect_to admin_accounts_path(pending: '1') end + def mark_unknown + authorize @account, :mark_unknown? + @account.mark_unknown! + log_action :mark_unknown, @account + redirect_to admin_account_path(@account.id) + end + + def mark_known + authorize @account, :mark_known? + @account.mark_known! + log_action :mark_known, @account + redirect_to admin_account_path(@account.id) + end + def force_sensitive authorize @account, :force_sensitive? @account.force_sensitive! diff --git a/app/controllers/admin/domain_blocks_controller.rb b/app/controllers/admin/domain_blocks_controller.rb index afba387cc..587c2c8c2 100644 --- a/app/controllers/admin/domain_blocks_controller.rb +++ b/app/controllers/admin/domain_blocks_controller.rb @@ -50,7 +50,7 @@ module Admin @domain_block.update(resource_params.except(:domain, :undo)) changed = @domain_block.changed if @domain_block.save - DomainBlockWorker.perform_async(@domain_block.id) if (changed & %w(severity force_sensitive reject_media)).any? + DomainBlockWorker.perform_async(@domain_block.id) if (changed & %w(severity force_sensitive reject_media reject_unknown)).any? log_action :update, @domain_block flash[:notice] = I18n.t('admin.domain_blocks.updated_msg') else @@ -66,7 +66,7 @@ module Admin end def resource_params - params.require(:domain_block).permit(:domain, :severity, :force_sensitive, :reject_media, :reject_reports, :reason, :undo) + params.require(:domain_block).permit(:domain, :severity, :force_sensitive, :reject_media, :reject_reports, :reject_unknown, :reason, :undo) end end end |