Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-09-26 09:11:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-09-26 09:11:42 +0300
commit403b33efdbc038a6bd42a50970e0985b385f73d7 (patch)
tree27fef01965172d58b4113519e503922f471b0bc6 /app/services/audit_events/build_service.rb
parent6fc01270bfda8ecadb47cade0b5649d32adb2822 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/audit_events/build_service.rb')
-rw-r--r--app/services/audit_events/build_service.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/app/services/audit_events/build_service.rb b/app/services/audit_events/build_service.rb
index f5322fa5ff4..9eab2f836db 100644
--- a/app/services/audit_events/build_service.rb
+++ b/app/services/audit_events/build_service.rb
@@ -11,7 +11,10 @@ module AuditEvents
def initialize(
author:, scope:, target:, message:,
created_at: DateTime.current, additional_details: {}, ip_address: nil, target_details: nil)
- raise MissingAttributeError if missing_attribute?(author, scope, target, message)
+ raise MissingAttributeError, "author" if author.blank?
+ raise MissingAttributeError, "scope" if scope.blank?
+ raise MissingAttributeError, "target" if target.blank?
+ raise MissingAttributeError, "message" if message.blank?
@author = build_author(author)
@scope = scope
@@ -32,10 +35,6 @@ module AuditEvents
private
- def missing_attribute?(author, scope, target, message)
- author.blank? || scope.blank? || target.blank? || message.blank?
- end
-
def payload
base_payload.merge(details: base_details_payload)
end