FIX: includes staff in staff_logins report (#6945)

FIX: includes staff in staff_logins report (#6945)

diff --git a/app/models/report.rb b/app/models/report.rb
index 8ee3db8..4622cde 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.admins.pluck(:id).join(',')})
+        WHERE t.user_id IN (#{User.staff.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

GitHub sha: 49193ca3

1 Like