Bug #24234
closedAudits taxonomies are being set from current context for non-taxable resources
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1600116
Description of problem:
the taxonomies are being set even for resources that do not use them.
e.g. Architectures
Version-Release number of selected component (if applicable):
6.4.0-11
Steps to Reproduce:
1. switch context so you're in org1 and loc1
2. create architecture
3. go to audits page, you should see the audit
4. switch to org2, you should still see the audit because architecture is non-taxable, the audit lives only in org1
Actual results:
Expected results:
Additional info:
Updated by Marek Hulán over 6 years ago
- Subject changed from Audits taxonomies are being set from current context for non-taxable resources to Audits taxonomies are being set from current context for non-taxable resources
- Assignee set to Sebastian Gräßl
- Target version set to 1.20.0
Updated by Ondřej Pražák over 6 years ago
Maybe something like https://github.com/xprazak2/foreman/commit/80fddf7f93a7ec9d963fd390a030b9a52250fdde could work.
Updated by Marek Hulán over 6 years ago
Yes, that's the idea. Sebastian is looking into this. We were thinking of adding taxable? method to ApplicationRecord but in fact we need to distinguish also between resources, that supports both taxonomies, only organizations (most of katello models) and none. Is something like supports_organizations? and supports_locations? using the respond_to? should work for detection.
Updated by The Foreman Bot over 6 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/6059 added
Updated by Sebastian Gräßl over 6 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset 84daf49a6e53daae231c5bdb8b2526f0b884bf39.