Sha256: 9a8cc97c5b63cdf87e9929b24770e9d0a2155c77a0d1c5e806c138cd2ea250ab

Contents?: true

Size: 324 Bytes

Versions: 62

Compression:

Stored size: 324 Bytes

Contents

module Workarea
  class AuditLogServerMiddleware
    def call(worker, msg, queue)
      return yield if msg['current_modifier_id'].blank?
      user = User.find(msg['current_modifier_id']) rescue nil

      if user.blank?
        yield
      else
        Mongoid::AuditLog.record(user) { yield }
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.5.27 app/middleware/workarea/audit_log_server_middleware.rb
workarea-core-3.5.26 app/middleware/workarea/audit_log_server_middleware.rb
workarea-core-3.4.45 app/middleware/workarea/audit_log_server_middleware.rb
workarea-core-3.5.25 app/middleware/workarea/audit_log_server_middleware.rb
workarea-core-3.5.23 app/middleware/workarea/audit_log_server_middleware.rb
workarea-core-3.4.44 app/middleware/workarea/audit_log_server_middleware.rb
workarea-core-3.5.22 app/middleware/workarea/audit_log_server_middleware.rb
workarea-core-3.4.43 app/middleware/workarea/audit_log_server_middleware.rb
workarea-core-3.5.21 app/middleware/workarea/audit_log_server_middleware.rb
workarea-core-3.4.42 app/middleware/workarea/audit_log_server_middleware.rb
workarea-core-3.5.20 app/middleware/workarea/audit_log_server_middleware.rb
workarea-core-3.4.41 app/middleware/workarea/audit_log_server_middleware.rb
workarea-core-3.5.19 app/middleware/workarea/audit_log_server_middleware.rb
workarea-core-3.4.40 app/middleware/workarea/audit_log_server_middleware.rb
workarea-core-3.5.18 app/middleware/workarea/audit_log_server_middleware.rb
workarea-core-3.4.39 app/middleware/workarea/audit_log_server_middleware.rb
workarea-core-3.5.17 app/middleware/workarea/audit_log_server_middleware.rb
workarea-core-3.4.38 app/middleware/workarea/audit_log_server_middleware.rb
workarea-core-3.5.16 app/middleware/workarea/audit_log_server_middleware.rb
workarea-core-3.4.37 app/middleware/workarea/audit_log_server_middleware.rb