Bug #20327
Configuration Management Reports csv export does not respect org/loc context
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1471947
Description of problem:
Did a CSV export via the UI of the configuration management report page. Set the filter to "eventful=false".
2 reports were listed (see the attached screenshot).
When I did the CSV export the resulting file had entries for all reports, including ones that did not belong to the "Default Organization", event though I was in this context.
Version-Release number of selected component (if applicable): 6.3.0
How reproducible: Always
Steps to Reproduce:
1. Create a host, and cause a puppet report to be generated.
2. Click "Export" button to export to CSV
Actual results: All Reports included in exported CSV
Expected results: Only the reports that are visible via the filter.
Additional info: Attached resulting CSV and screen shot, as well as foreman-debug
Associated revisions
Fixes #20248, #20327 - Respect context in CSV export
Since CSV export is done using an enumerator which is executed by a
different thread to the one that creates it, we need to manually pass in
the context (user, location, organization) to the enumerator.
(cherry picked from commit c8f5cd53b3551867e54aedd24116293b0e2312d1)
Fixes #20248, #20327 - Respect context in CSV export
Since CSV export is done using an enumerator which is executed by a
different thread to the one that creates it, we need to manually pass in
the context (user, location, organization) to the enumerator.
(cherry picked from commit c8f5cd53b3551867e54aedd24116293b0e2312d1)
History
#1
Updated by The Foreman Bot over 5 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/4653 added
#2
Updated by Daniel Lobato Garcia over 5 years ago
- Legacy Backlogs Release (now unused) set to 240
#3
Updated by Tomer Brisker over 5 years ago
- Status changed from Ready For Testing to Closed
#4
Updated by Tomer Brisker over 5 years ago
- Legacy Backlogs Release (now unused) changed from 240 to 276
#5
Updated by Tomer Brisker about 3 years ago
- Category changed from Statistics to Reporting
Fixes #20248, #20327 - Respect context in CSV export
Since CSV export is done using an enumerator which is executed by a
different thread to the one that creates it, we need to manually pass in
the context (user, location, organization) to the enumerator.