From f461a9971f2c4962dd8362c625d48bca18cda8ef Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Fri, 25 Jan 2019 11:28:52 +0100 Subject: [PATCH] FIX: makes staff_logins show only admins (#6948) --- app/models/report.rb | 2 +- config/locales/server.en.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/report.rb b/app/models/report.rb index 4622cde935..8ee3db80ce 100644 --- a/app/models/report.rb +++ b/app/models/report.rb @@ -1364,7 +1364,7 @@ class Report FROM ( SELECT DISTINCT ON (t.client_ip, t.user_id) t.client_ip, t.user_id, t.created_at FROM user_auth_token_logs t - WHERE t.user_id IN (#{User.staff.pluck(:id).join(',')}) + WHERE t.user_id IN (#{User.admins.pluck(:id).join(',')}) AND t.created_at >= :start_date AND t.created_at <= :end_date ORDER BY t.client_ip, t.user_id, t.created_at DESC diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index eb74ea88cb..ce91540090 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -1199,12 +1199,12 @@ en: login_time: Login Time description: "Details of new logins that differ suspiciously from previous logins." staff_logins: - title: "Staff Logins" + title: "Admin Logins" labels: user: User location: Location login_at: Login at - description: "List of admin and moderator login times with locations." + description: "List of admin login times with locations." top_uploads: title: "Top Uploads" labels: