From 5917b46c0530777b684cbd661d0f454264e4f046 Mon Sep 17 00:00:00 2001 From: Claire Date: Thu, 15 Dec 2022 14:15:50 +0100 Subject: [PATCH] Allow admins to refresh remotely-suspended accounts (#22327) * Change suspension text to mention that a remotely suspended account is not locally-suspended * Add ability to refresh profile of remotely suspended accounts --- app/views/admin/accounts/show.html.haml | 6 +++++- config/locales/en.yml | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/views/admin/accounts/show.html.haml b/app/views/admin/accounts/show.html.haml index dc3b359566..db5c255c91 100644 --- a/app/views/admin/accounts/show.html.haml +++ b/app/views/admin/accounts/show.html.haml @@ -195,9 +195,13 @@ - if @account.suspended? %hr.spacer/ - %p.muted-hint= @deletion_request.present? ? t('admin.accounts.suspension_reversible_hint_html', date: content_tag(:strong, l(@deletion_request.due_at.to_date))) : t('admin.accounts.suspension_irreversible') + - if @account.suspension_origin_remote? + %p.muted-hint= @deletion_request.present? ? t('admin.accounts.remote_suspension_reversible_hint_html', date: content_tag(:strong, l(@deletion_request.due_at.to_date))) : t('admin.accounts.remote_suspension_irreversible') + - else + %p.muted-hint= @deletion_request.present? ? t('admin.accounts.suspension_reversible_hint_html', date: content_tag(:strong, l(@deletion_request.due_at.to_date))) : t('admin.accounts.suspension_irreversible') = link_to t('admin.accounts.undo_suspension'), unsuspend_admin_account_path(@account.id), method: :post, class: 'button' if can?(:unsuspend, @account) + = link_to t('admin.accounts.redownload'), redownload_admin_account_path(@account.id), method: :post, class: 'button' if can?(:redownload, @account) && @account.suspension_origin_remote? - if @deletion_request.present? = link_to t('admin.accounts.delete'), admin_account_path(@account.id), method: :delete, class: 'button button--destructive', data: { confirm: t('admin.accounts.are_you_sure') } if can?(:destroy, @account) diff --git a/config/locales/en.yml b/config/locales/en.yml index a045db1ab1..0a0effbc1d 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -116,6 +116,8 @@ en: redownloaded_msg: Successfully refreshed %{username}'s profile from origin reject: Reject rejected_msg: Successfully rejected %{username}'s sign-up application + remote_suspension_irreversible: The data of this account has been irreversibly deleted. + remote_suspension_reversible_hint_html: The account has been suspended on their server, and the data will be fully removed on %{date}. Until then, the remote server can restore this account without any ill effects. If you wish to remove all of the account's data immediately, you can do so below. remove_avatar: Remove avatar remove_header: Remove header removed_avatar_msg: Successfully removed %{username}'s avatar image