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:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-08-02 16:30:27 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-08-02 16:41:14 +0300
commite698a22e10c1773017bea7efd4417c371f2e1c11 (patch)
treef4c115123e5454592b5a8ce184d6816b6367ecc9 /app/controllers
parentc2a5bbc295b6ff8159e5f70548ee161900aaf241 (diff)
Skip redunant before_logout warden events
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/application_controller.rb11
1 files changed, 1 insertions, 10 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index fa7daa65c4a..3c9ad05ef86 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -24,6 +24,7 @@ class ApplicationController < ActionController::Base
before_action :configure_permitted_parameters, if: :devise_controller?
before_action :require_email, unless: :devise_controller?
+
around_action :set_locale
after_action :set_page_title_header, if: -> { request.format == :json }
@@ -127,13 +128,7 @@ class ApplicationController < ActionController::Base
# Controllers such as GitHttpController may use alternative methods
# (e.g. tokens) to authenticate the user, whereas Devise sets current_user.
#
- # `current_user` call is going to trigger Warden::Proxy authentication
- # that is going to invoke warden callbacks, and we don't want to do it
- # twice in case of authentication request.
- #
def auth_user
- return if authentication_request?
-
if user_signed_in?
current_user
else
@@ -141,10 +136,6 @@ class ApplicationController < ActionController::Base
end
end
- def authentication_request?
- controller_name == 'sessions' && action_name == 'create'
- end
-
# This filter handles personal access tokens, and atom requests with rss tokens
def authenticate_sessionless_user!
user = Gitlab::Auth::RequestAuthenticator.new(request).find_sessionless_user