diff options
author | Claire <claire.github-309c@sitedethib.com> | 2021-12-18 13:17:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-18 13:17:37 +0100 |
commit | 3b9a6049adf3ee6844a81622c297dd893836f79d (patch) | |
tree | faf39c54064077baa984998a589803ecb7ecf230 /app/controllers/admin/accounts_controller.rb | |
parent | fec4ed507466617ef34304b7d00d0383e8a958bb (diff) | |
parent | e061ea5f71109edbbf7869265f443448cace4f60 (diff) |
Merge pull request #1650 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/controllers/admin/accounts_controller.rb')
-rw-r--r-- | app/controllers/admin/accounts_controller.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/admin/accounts_controller.rb b/app/controllers/admin/accounts_controller.rb index 948e70d5b..0786985fa 100644 --- a/app/controllers/admin/accounts_controller.rb +++ b/app/controllers/admin/accounts_controller.rb @@ -117,6 +117,16 @@ module Admin redirect_to admin_account_path(@account.id), notice: I18n.t('admin.accounts.removed_header_msg', username: @account.acct) end + def unblock_email + authorize @account, :unblock_email? + + CanonicalEmailBlock.where(reference_account: @account).delete_all + + log_action :unblock_email, @account + + redirect_to admin_account_path(@account.id), notice: I18n.t('admin.accounts.unblocked_email_msg', username: @account.acct) + end + private def set_account |