diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
commit | a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch) | |
tree | fb69158581673816a8cd895f9d352dcb3c678b1e /lib/api/helpers.rb | |
parent | d16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff) |
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r-- | lib/api/helpers.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index 632717e1b73..6ce04be373f 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -74,6 +74,11 @@ module API save_current_user_in_env(@current_user) if @current_user + if @current_user + ::Gitlab::Database::LoadBalancing::RackMiddleware + .stick_or_unstick(env, :user, @current_user.id) + end + @current_user end # rubocop:enable Gitlab/ModuleWithInstanceVariables @@ -482,9 +487,8 @@ module API def handle_api_exception(exception) if report_exception?(exception) define_params_for_grape_middleware - Gitlab::ApplicationContext.with_context(user: current_user) do - Gitlab::ErrorTracking.track_exception(exception) - end + Gitlab::ApplicationContext.push(user: current_user) + Gitlab::ErrorTracking.track_exception(exception) end # This is used with GrapeLogging::Loggers::ExceptionLogger @@ -599,6 +603,7 @@ module API :custom_attributes, :last_activity_after, :last_activity_before, + :topic, :repository_storage) .symbolize_keys .compact @@ -611,7 +616,6 @@ module API finder_params[:user] = params.delete(:user) if params[:user] finder_params[:id_after] = sanitize_id_param(params[:id_after]) if params[:id_after] finder_params[:id_before] = sanitize_id_param(params[:id_before]) if params[:id_before] - finder_params[:tag] = params[:topic] if params[:topic].present? finder_params end |