Merge pull request #14498 from snipe/features/limit_report_by_admin

Fixed #14495 - Allow user_id to be passed to limit to only specific admins
This commit is contained in:
snipe 2024-03-26 14:52:03 +00:00 committed by GitHub
commit df49e8350f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -45,6 +45,10 @@ class ReportsController extends Controller
$actionlogs = $actionlogs->where('action_type', '=', $request->input('action_type'))->orderBy('created_at', 'desc');
}
if ($request->filled('user_id')) {
$actionlogs = $actionlogs->where('user_id', '=', $request->input('user_id'));
}
if ($request->filled('action_source')) {
$actionlogs = $actionlogs->where('action_source', '=', $request->input('action_source'))->orderBy('created_at', 'desc');
}