diff options
author | Jason Hollingsworth <jhworth.developer@gmail.com> | 2013-12-03 08:22:33 -0600 |
---|---|---|
committer | Jason Hollingsworth <jhworth.developer@gmail.com> | 2013-12-04 13:10:20 -0600 |
commit | c099074fcc96304d948cc028ff7ae5913b561ed3 (patch) | |
tree | fcfb93fbd75f00c62b527d1829014bbf8b90c476 /app/controllers | |
parent | 23d180f5f1905eb8d714daaf2d097767ff355817 (diff) | |
download | gitlab-ce-c099074fcc96304d948cc028ff7ae5913b561ed3.tar.gz |
Fix 404 on project page for unauthenticated user
Eliminate a 404 error when user is not logged in and attempts to visit
a project page.
The 404 page will still show up when user is logged in and the project
doesn’t exist or the user doesn’t have access.
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/application_controller.rb | 3 |
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 |