Skip to content

Commit

Permalink
Fixes #22993 - refactor audits definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
ares authored and iNecas committed Apr 23, 2018
1 parent 499c497 commit 4b4bb45
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/models/job_invocation.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
class JobInvocation < ApplicationRecord
audited :except => [:task_id, :targeting_id, :task_group_id, :triggering_id]

include Authorizable
include Encryptable

audited :except => [ :task_id, :targeting_id, :task_group_id, :triggering_id ]

include ForemanRemoteExecution::ErrorsFlattener
FLATTENED_ERRORS_MAPPING = {
:pattern_template_invocations => lambda do |template_invocation|
Expand Down
2 changes: 1 addition & 1 deletion app/models/job_template.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
class JobTemplate < ::Template
audited
include ::Exportable

class NonUniqueInputsError < Foreman::Exception
Expand All @@ -12,7 +13,6 @@ class NonUniqueInputsError < Foreman::Exception
friendly_id :name
include Parameterizable::ByIdName

audited :allow_mass_assignment => true
has_many :audits, :as => :auditable, :class_name => Audited.audit_class.name, :dependent => :nullify
has_many :all_template_invocations, :dependent => :destroy, :foreign_key => 'template_id', :class_name => 'TemplateInvocation'
has_many :template_invocations, -> { where('host_id IS NOT NULL') }, :foreign_key => 'template_id'
Expand Down

0 comments on commit 4b4bb45

Please sign in to comment.