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
path: root/app
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2017-05-19 22:55:56 +0300
committerDouwe Maan <douwe@gitlab.com>2017-05-19 22:55:56 +0300
commit776d4ba5c99d2d15bf3759a35f515fdb4406af56 (patch)
tree88d81c13bb154f6456f4a26b8300619a7da218cf /app
parent5460153c9f1a0b1679e4f31f1d588cb77857b714 (diff)
parent49ded5c1fa31abf004d85f369e8b464879bbd781 (diff)
Merge branch 'fix-json-endpoint-redirection' into 'master'
Bugfix: don't redirect to JSON endpoints after sign in See merge request !11561
Diffstat (limited to 'app')
-rw-r--r--app/controllers/projects/issues_controller.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb
index 46438e68d54..cbef8fa94d4 100644
--- a/app/controllers/projects/issues_controller.rb
+++ b/app/controllers/projects/issues_controller.rb
@@ -277,7 +277,10 @@ class Projects::IssuesController < Projects::ApplicationController
notice = "Please sign in to create the new issue."
- store_location_for :user, request.fullpath
+ if request.get? && !request.xhr?
+ store_location_for :user, request.fullpath
+ end
+
redirect_to new_user_session_path, notice: notice
end
end