Project

General

Profile

Bug #24234

Audits taxonomies are being set from current context for non-taxable resources

Added by Marek Hulán 5 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Category:
Audit Log
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

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:

Associated revisions

Revision 84daf49a (diff)
Added by Sebastian Gräßl 3 months ago

Fixes #24234 - Set no taxonomies on audit for untaxable resources (#6059)

History

#1 Updated by Marek Hulán 3 months ago

  • Target version set to 1.20.0
  • Assignee set to Sebastian Gräßl
  • 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

#3 Updated by Marek Hulán 3 months 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.

#4 Updated by The Foreman Bot 3 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/6059 added

#5 Updated by Marek Hulán 3 months ago

  • Fixed in Releases 1.20.0 added

#6 Updated by Sebastian Gräßl 3 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF