Commit 8d89dec4 authored by Imre Farkas's avatar Imre Farkas

Merge branch '216577-fix-ruby-object-in-audit-event' into 'master'

Avoid saving author object in audit_events table

See merge request gitlab-org/gitlab!31456
parents ddc74809 83c863b2
......@@ -90,7 +90,7 @@ module EE
@details = {
failed_login: auth.upcase,
author_name: @author.name,
target_details: @author,
target_details: @author.name,
ip_address: ip
}
......
---
title: Avoid saving author object in audit_events table
merge_request: 31456
author:
type: fixed
......@@ -249,6 +249,10 @@ describe AuditEventService do
expect(event.details[:author_name]).to eq(author_name)
end
it 'has the right target_details' do
expect(event.details[:target_details]).to eq(author_name)
end
it 'has the right auth method for OAUTH' do
oauth_service = described_class.new(author_name, nil, ip_address: ip_address, with: 'ldap')
event = oauth_service.for_failed_login.unauth_security_event
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment