Commit fd6e03de authored by James Lopez's avatar James Lopez

refactor create service

parent 6b87515c
......@@ -3,13 +3,16 @@ module EE
module CreateService
def execute
super.tap do |application|
audit_event_service.for_user(application.name).security_event
end
end
def audit_event_service
::AuditEventService.new(@current_user,
@current_user,
action: :custom,
custom_message: 'OAuth access granted',
ip_address: @ip_address)
.for_user(application.name).security_event
end
end
end
end
......
......@@ -8,12 +8,15 @@ module EE
end
def log_audit_event(key)
audit_event_service.for_user(key.title).security_event
end
def audit_event_service
::AuditEventService.new(@user,
@user,
action: :custom,
custom_message: 'Added SSH key',
ip_address: @ip_address)
.for_user(key.title).security_event
end
end
end
......
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