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:
Diffstat (limited to 'app/controllers/sessions_controller.rb')
-rw-r--r--app/controllers/sessions_controller.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb
index e2dd2d77a30..01c23ce9db7 100644
--- a/app/controllers/sessions_controller.rb
+++ b/app/controllers/sessions_controller.rb
@@ -26,6 +26,8 @@ class SessionsController < Devise::SessionsController
before_action :load_recaptcha
before_action :frontend_tracking_data, only: [:new]
+ around_action :set_current_context
+
after_action :log_failed_login, if: :action_new_and_failed_login?
helper_method :captcha_enabled?, :captcha_on_login_required?
@@ -305,6 +307,13 @@ class SessionsController < Devise::SessionsController
# We want tracking data pushed to the frontend when the user is _in_ the control group
frontend_experimentation_tracking_data(:signup_flow, 'start') unless experiment_enabled?(:signup_flow)
end
+
+ def set_current_context(&block)
+ Gitlab::ApplicationContext.with_context(
+ user: -> { current_user },
+ caller_id: "#{self.class.name}##{action_name}",
+ &block)
+ end
end
SessionsController.prepend_if_ee('EE::SessionsController')