summaryrefslogtreecommitdiff
path: root/app/models/audit_event.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-08-20 18:42:06 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-08-20 18:42:06 +0000
commit6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch)
tree78be5963ec075d80116a932011d695dd33910b4e /app/models/audit_event.rb
parent1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff)
downloadgitlab-ce-6e4e1050d9dba2b7b2523fdd1768823ab85feef4.tar.gz
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'app/models/audit_event.rb')
-rw-r--r--app/models/audit_event.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/models/audit_event.rb b/app/models/audit_event.rb
index 13fc2514f0c..e7cfa30a892 100644
--- a/app/models/audit_event.rb
+++ b/app/models/audit_event.rb
@@ -5,7 +5,7 @@ class AuditEvent < ApplicationRecord
include IgnorableColumns
include BulkInsertSafe
- PARALLEL_PERSISTENCE_COLUMNS = [:author_name, :entity_path].freeze
+ PARALLEL_PERSISTENCE_COLUMNS = [:author_name, :entity_path, :target_details].freeze
ignore_column :updated_at, remove_with: '13.4', remove_after: '2020-09-22'
@@ -58,6 +58,12 @@ class AuditEvent < ApplicationRecord
end
end
+ def as_json(options = {})
+ super(options).tap do |json|
+ json['ip_address'] = self.ip_address.to_s
+ end
+ end
+
private
def default_author_value