FEATURE: show silence reason when viewing silenced users (#30635)

This adds the Silence Reason column to silenced user lists.

This feature helps combat large spam attacks cause you can quickly see
why a user was silenced and then bulk act on all the silenced users
This commit is contained in:
Sam
2025-01-08 16:04:19 +11:00
committed by GitHub
parent a88c86beef
commit 9cf78ba195
9 changed files with 128 additions and 39 deletions

View File

@ -32,7 +32,7 @@ class Admin::UsersController < Admin::StaffController
def index
users = ::AdminUserIndexQuery.new(params).find_users
opts = { include_can_be_deleted: true }
opts = { include_can_be_deleted: true, include_silence_reason: true }
if params[:show_emails] == "true"
StaffActionLogger.new(current_user).log_show_emails(users, context: request.path)
opts[:emails_desired] = true