gitlabhq/gitlabhq — pull request #5752 by jhollingsworth (2013-12-03 15:28:20+00:00)
Title: 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.

This is useful if someone sends you a link and you don't happen to be signed in. It will redirect to the sign in page rather than just presenting a 404 right away. If you login and still don't have access, you will then see the 404.

This takes into account the fact that the project doesn't exist, so a non-existent project is treated the same as a project that does exist. So, no one can use 404 vs redirect to determine which projects exist on the server.