Actions
Bug #12728
closedReport should have host_id, reported_at, status and metrics attr_accessible
Description
In report model we should add attr_accessible :host_id, :reported_at, :status, :metrics
to support children who assign those values.
Updated by Dominic Cleal about 9 years ago
- Related to Bug #7568: Use attr_accessible for rails 4 upgrade added
Updated by Dominic Cleal about 9 years ago
- Category set to Rails
The report importers don't use mass-assignment at the moment, AFAIK.
Updated by The Foreman Bot about 9 years ago
- Status changed from New to Ready For Testing
- Assignee set to Shlomi Zadok
- Pull request https://github.com/theforeman/foreman/pull/2961 added
Updated by Shlomi Zadok about 9 years ago
Use case:
In foreman_openscap, we do not use a report importer, the ArfReport has a method which simulates the importer to create the ArfReport.
As you can see, we generate the report directly with ArfReport.create! which yields:
Action failed ActiveModel::MassAssignmentSecurity::Error: Can't mass-assign protected attributes: host_id, reported_at, status, metrics
Updated by Dominic Cleal about 9 years ago
- Translation missing: en.field_release set to 71
Due to using Taxonomix in the ArfReport model, it makes the model protected.
Updated by Shlomi Zadok about 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 104468b273b73486d58d89802ee87b301ad6ef19.
Actions