mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
Lots bounce emails related fixes
- Show bounce score on user admin page - Added reset bounce score button on user admin page - Only whitelisted email types are sent to emails with high bounce score - FIX: properly detect bounces even when there is no TO: header in the email - Don't desactivate a user when reaching the bounce threshold
This commit is contained in:
@ -23,7 +23,8 @@ class Admin::UsersController < Admin::AdminController
|
||||
:primary_group,
|
||||
:generate_api_key,
|
||||
:revoke_api_key,
|
||||
:anonymize]
|
||||
:anonymize,
|
||||
:reset_bounce_score]
|
||||
|
||||
def index
|
||||
users = ::AdminUserIndexQuery.new(params).find_users
|
||||
@ -355,6 +356,12 @@ class Admin::UsersController < Admin::AdminController
|
||||
end
|
||||
end
|
||||
|
||||
def reset_bounce_score
|
||||
guardian.ensure_can_reset_bounce_score!(@user)
|
||||
@user.user_stat.update_columns(bounce_score: 0, reset_bounce_score_after: nil)
|
||||
render json: success_json
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def fetch_user
|
||||
|
Reference in New Issue
Block a user