Audit logging improved. References users, screenshots, packages

This commit is contained in:
Christoph Haas 2021-03-03 23:21:24 +01:00
parent b6dee6b93c
commit 2fef9c7043
12 changed files with 95 additions and 45 deletions

View file

@ -28,4 +28,10 @@ class ApplicationController < ActionController::Base
def after_sign_out_path_for(resource_or_scope)
root_path
end
# Write a message into the audit log in the database
def auditlog(message, level: 'info', screenshot: nil, package: nil)
Log.log(message, ip: request.remote_ip, user: current_user,
screenshot: screenshot, package: package)
end
end