Class: RivetCms::AuditEvent
- Inherits:
-
Struct
- Object
- Struct
- RivetCms::AuditEvent
- Defined in:
- lib/rivet_cms/audit.rb
Overview
One observability stream over every admin mutation, fired as the :audit hook. Named events (:publish, :prune) are behavior hooks carrying rich domain objects for a specific moment; :audit is uniform who/what/when data for consumers that want all of it (audit logs, activity feeds, SIEM pipelines).
RivetCms.on(:audit) do |event|
AuditRow.create!(action: event.action, subject: event.subject_id, ...)
end
The payload is plain values plus the actor object; subscribers must tolerate unknown actions, since the vocabulary grows in minor releases. CE audits admin UI mutations; console and seed changes are not recorded.
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#actor ⇒ Object
Returns the value of attribute actor.
-
#at ⇒ Object
Returns the value of attribute at.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#organization_id ⇒ Object
Returns the value of attribute organization_id.
-
#subject_id ⇒ Object
Returns the value of attribute subject_id.
-
#subject_label ⇒ Object
Returns the value of attribute subject_label.
-
#subject_type ⇒ Object
Returns the value of attribute subject_type.
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action
15 16 17 |
# File 'lib/rivet_cms/audit.rb', line 15 def action @action end |
#actor ⇒ Object
Returns the value of attribute actor
15 16 17 |
# File 'lib/rivet_cms/audit.rb', line 15 def actor @actor end |
#at ⇒ Object
Returns the value of attribute at
15 16 17 |
# File 'lib/rivet_cms/audit.rb', line 15 def at @at end |
#metadata ⇒ Object
Returns the value of attribute metadata
15 16 17 |
# File 'lib/rivet_cms/audit.rb', line 15 def @metadata end |
#organization_id ⇒ Object
Returns the value of attribute organization_id
15 16 17 |
# File 'lib/rivet_cms/audit.rb', line 15 def organization_id @organization_id end |
#subject_id ⇒ Object
Returns the value of attribute subject_id
15 16 17 |
# File 'lib/rivet_cms/audit.rb', line 15 def subject_id @subject_id end |
#subject_label ⇒ Object
Returns the value of attribute subject_label
15 16 17 |
# File 'lib/rivet_cms/audit.rb', line 15 def subject_label @subject_label end |
#subject_type ⇒ Object
Returns the value of attribute subject_type
15 16 17 |
# File 'lib/rivet_cms/audit.rb', line 15 def subject_type @subject_type end |