diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-05-19 19:55:56 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-05-19 19:55:56 +0000 |
commit | 776d4ba5c99d2d15bf3759a35f515fdb4406af56 (patch) | |
tree | 88d81c13bb154f6456f4a26b8300619a7da218cf /app/controllers | |
parent | 5460153c9f1a0b1679e4f31f1d588cb77857b714 (diff) | |
parent | 49ded5c1fa31abf004d85f369e8b464879bbd781 (diff) | |
download | gitlab-ce-776d4ba5c99d2d15bf3759a35f515fdb4406af56.tar.gz |
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/controllers')
-rw-r--r-- | app/controllers/projects/issues_controller.rb | 5 |
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 |