Bug #19354

associated_type is set to a wrong value in audit_extensions.rb

Added by Shimon Shtein about 1 year ago. Updated 10 months ago.

Status:Closed
Priority:Normal
Assigned To:Ori Rabin
Category:Audit Log
Target version:-
Difficulty: Bugzilla link:
Found in release: Pull request:https://github.com/theforeman/foreman/pull/4165
Story points-
Velocity based estimate-
Release1.16.0Release relationshipAuto

Description

When fixing STI types for :associated field in AuditExtensions#fix_auditable_type, the type is set to the one from :auditable object instead the one from :associated field.
It looks like a copy-paste error.

Associated revisions

Revision 364c5208
Added by Ori Rabin 10 months ago

Fixes #17918,#19354 - Smart class parameters appear in audits

History

#1 Updated by Dominic Cleal about 1 year ago

  • Category set to Audit Log

Specifically, I think this means:

self.associated_type = auditable.type if auditable_type == "Taxonomy" && auditable

Uses the auditable type, but sets associated_type.

#2 Updated by Shimon Shtein about 1 year ago

exactly, thanks for clarifying!

#3 Updated by The Foreman Bot 10 months ago

  • Status changed from New to Ready For Testing
  • Assigned To set to Ori Rabin
  • Pull request https://github.com/theforeman/foreman/pull/4165 added

#4 Updated by Tomer Brisker 10 months ago

  • Status changed from Ready For Testing to Closed
  • Release set to 1.16.0

Also available in: Atom PDF