Class: HrLite::AuditLog

Inherits:
ApplicationRecord show all
Defined in:
app/models/hr_lite/audit_log.rb

Overview

Append-only trail of every governing-tier mutation. Rows are never updated or deleted; the leadership audit screen and the policy.changed email diff both read from here.

Constant Summary collapse

MONEY_TIER_TYPES =

Subjects whose CONTENTS belong to the money tier. Salary structures encrypt their amounts so the diff is already redacted, but appraisal ratings and review text are plain columns — they must not reach the leadership audit screen or the policy.changed email.

%w[HrLite::Appraisal HrLite::DesignationChange HrLite::SalaryStructure].freeze

Instance Method Summary collapse

Instance Method Details

#money_tier?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'app/models/hr_lite/audit_log.rb', line 20

def money_tier?
  MONEY_TIER_TYPES.include?(subject_type)
end

#readonly?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'app/models/hr_lite/audit_log.rb', line 24

def readonly?
  persisted?
end