diff options
author | Francis Murillo <evacuee.overlap.vs3op@aleeas.com> | 2022-12-06 23:25:18 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-07 00:25:18 +0100 |
commit | f6492a7c4d7cd08364ba507911f6b3c3df1c7e70 (patch) | |
tree | 76870ec05f7b77a2c8534b2b59c6a3c2f8df9190 /app/controllers/admin | |
parent | c8849d6ceecfdb9c18284fcc57a7e29019b4cd05 (diff) |
Log admin approve and reject account (#22088)
* Log admin approve and reject account * Add unit tests for approve and reject logging
Diffstat (limited to 'app/controllers/admin')
-rw-r--r-- | app/controllers/admin/accounts_controller.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/admin/accounts_controller.rb b/app/controllers/admin/accounts_controller.rb index 40bf685c5..9beb8fde6 100644 --- a/app/controllers/admin/accounts_controller.rb +++ b/app/controllers/admin/accounts_controller.rb @@ -55,12 +55,14 @@ module Admin def approve authorize @account.user, :approve? @account.user.approve! + log_action :approve, @account.user redirect_to admin_accounts_path(status: 'pending'), notice: I18n.t('admin.accounts.approved_msg', username: @account.acct) end def reject authorize @account.user, :reject? DeleteAccountService.new.call(@account, reserve_email: false, reserve_username: false) + log_action :reject, @account.user redirect_to admin_accounts_path(status: 'pending'), notice: I18n.t('admin.accounts.rejected_msg', username: @account.acct) end |