mirror of
https://github.com/mastodon/mastodon.git
synced 2026-10-01 05:52:15 -05:00
Add logging of account data removal (#40572)
This commit is contained in:
@@ -72,6 +72,7 @@ module Admin
|
||||
def destroy
|
||||
authorize @account, :destroy?
|
||||
Admin::AccountDeletionWorker.perform_async(@account.id)
|
||||
log_action :destroy, @account
|
||||
redirect_to admin_account_path(@account.id), notice: I18n.t('admin.accounts.destroyed_msg', username: @account.acct)
|
||||
end
|
||||
|
||||
|
||||
@@ -69,6 +69,7 @@ class Api::V1::Admin::AccountsController < Api::BaseController
|
||||
def destroy
|
||||
authorize @account, :destroy?
|
||||
Admin::AccountDeletionWorker.perform_async(@account.id)
|
||||
log_action :destroy, @account
|
||||
render_empty
|
||||
end
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ class Scheduler::SuspendedUserCleanupScheduler
|
||||
# This should be fine because we only process a small amount of deletion requests at once and
|
||||
# `id` and `created_at` should follow the same order.
|
||||
AccountDeletionRequest.reorder(id: :asc).take(MAX_DELETIONS_PER_JOB).each do |deletion_request|
|
||||
next unless deletion_request.created_at < AccountDeletionRequest::DELAY_TO_DELETION.ago
|
||||
next unless deletion_request.due_at.past?
|
||||
|
||||
Admin::AccountDeletionWorker.perform_async(deletion_request.account_id)
|
||||
end
|
||||
|
||||
@@ -200,6 +200,7 @@ en:
|
||||
create_user_role: Create Role
|
||||
create_username_block: Create Username Rule
|
||||
demote_user: Demote User
|
||||
destroy_account: Delete Account Data
|
||||
destroy_announcement: Delete Announcement
|
||||
destroy_canonical_email_block: Delete Email Block
|
||||
destroy_custom_emoji: Delete Custom Emoji
|
||||
@@ -268,6 +269,7 @@ en:
|
||||
create_user_role_html: "%{name} created %{target} role"
|
||||
create_username_block_html: "%{name} added rule for usernames containing %{target}"
|
||||
demote_user_html: "%{name} demoted user %{target}"
|
||||
destroy_account_html: "%{name} deleted account data for %{target}"
|
||||
destroy_announcement_html: "%{name} deleted announcement %{target}"
|
||||
destroy_canonical_email_block_html: "%{name} unblocked email with the hash %{target}"
|
||||
destroy_collection_html: "%{name} removed collection by %{target}"
|
||||
|
||||
Reference in New Issue
Block a user