Sha256: 0ba866943961e314047b9a6fc198199f83a2ba5782f4995e41022e6048b6d713

Contents?: true

Size: 568 Bytes

Versions: 1

Compression:

Stored size: 568 Bytes

Contents

# Use this to restrict users, clusters, etc.
# Also add a check to ensure that this is running, so that if people try to
# bypass it it gets picked up
# Also run regular async checks as another check
require 'wisper'

module ProxES
  class Listener
    def method_missing(method, *args, &block)
      vals = { action: method }
      vals[:user] = args[0][:user] if (args[0] && args[0].has_key?(:user))
      AuditLog.create vals
    end

    def respond_to_missing?(method, include_private = false)
      true
    end
  end
end

Wisper.subscribe(ProxES::Listener.new)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
proxes-0.2.0 lib/proxes/listener.rb