FIX: includes staff in staff_logins report (#6945)

This commit is contained in:
Joffrey JAFFEUX 2019-01-24 14:46:56 +01:00 committed by GitHub
parent c88fd49591
commit 49193ca3bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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