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:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-12-05 19:16:45 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-12-05 19:16:45 +0400
commita767c13367c25d2684c94a90ee9f91f02da286a9 (patch)
tree08220c446ae69f5650615ebb3144510586887793 /app
parente5f4c7883fc6373da2681cac4bd0ea614566a4bc (diff)
parentc099074fcc96304d948cc028ff7ae5913b561ed3 (diff)
Merge pull request #5752 from jhollingsworth/fix/no-404-for-project
Fix 404 on project page for unauthenticated user
Diffstat (limited to 'app')
-rw-r--r--app/controllers/application_controller.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index a83d6dfed8d..e5b5a3a4777 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -81,6 +81,9 @@ class ApplicationController < ActionController::Base
if @project and can?(current_user, :read_project, @project)
@project
+ elsif current_user.nil?
+ @project = nil
+ authenticate_user!
else
@project = nil
render_404 and return