Skip to content

Commit

Permalink
Add audited context support
Browse files Browse the repository at this point in the history
  • Loading branch information
amkisko committed Dec 13, 2024
1 parent adff33d commit 648d425
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/action_reporter/audited_reporter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ def notify(*)
end

def context(args)
Audited.context = Audited.context.merge(args) if Audited.respond_to?(:context=)
end

def reset_context
Audited.store.delete(:current_remote_address)
Audited.store.delete(:current_request_uuid)
Audited.store.delete(:audited_user)
Audited.context = {} if Audited.respond_to?(:context=)
end

def current_user
Expand Down

0 comments on commit 648d425

Please sign in to comment.