Class: Shamu::Auditing::AuditingService

Inherits:
Services::Service show all
Defined in:
lib/shamu/auditing/auditing_service.rb

Overview

Records audit transactions to record change requests made to a Services::Service that includes auditing Support.

Security Note the audit service does not enforce any security policies for reading or writing. It is expected that audit transactions should be recordable by any service and that reading those audits will be limited by some admin only accessible resource. To expose the audit records via a web interface, create a proxy AuditingService that has it's own Security::Policy but delegates the actual reading and writing.

Instance Attribute Summary

Attributes inherited from Services::Service

#logger

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Services::Service

#cache_for, #cached_lookup, #entity_list, #entity_lookup_list, #error, #find_by_lookup, #lazy_association, #lookup_association, #result

Class Method Details

.create(scorpion, *args) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/shamu/auditing/auditing_service.rb', line 15

def self.create( scorpion, *args )
  if defined? ActiveRecord
    scorpion.fetch Shamu::Auditing::ActiveRecord::Service, *args
  else
    fail "No available auditing service available."
  end
end

Instance Method Details

#commit(transaction) ⇒ AuditRecord

Records an auditable event in persistent storage.

Parameters:

Returns:



26
27
28
# File 'lib/shamu/auditing/auditing_service.rb', line 26

def commit( transaction )
  fail NotImplementedError
end