Skip to content
Snippets Groups Projects

Adding new audit event scope for instance level audit events

Merged Hitesh Raghuvanshi requested to merge 404730-instance-scope into master
11 files
+ 179
12
Compare changes
  • Side-by-side
  • Inline
Files
11
@@ -25,6 +25,18 @@ def find_object(destination_gid)
@@ -25,6 +25,18 @@ def find_object(destination_gid)
destination
destination
end
end
 
 
def audit(destination, action:)
 
audit_context = {
 
name: "#{action}_instance_event_streaming_destination",
 
author: current_user,
 
scope: Gitlab::Audit::InstanceScope.new,
 
target: destination,
 
message: "#{action.capitalize} instance event streaming destination #{destination.destination_url}"
 
}
 
 
::Gitlab::Audit::Auditor.audit(audit_context)
 
end
end
end
end
end
end
end
Loading