summaryrefslogtreecommitdiff
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-11-24 04:31:54 +0000
committerDouwe Maan <douwe@gitlab.com>2016-11-24 04:31:54 +0000
commita7a9db803b983659e8804e07aee89c935473cc41 (patch)
treeeb6afe65fdcf9152caf80917dc2fee019021d9f9 /app/controllers/application_controller.rb
parentf70a6f3dcaf24d1f70359d4d011294573bc549c1 (diff)
parent6683fdcfb0ae4ceb368b6f5f63dde0a10a4a3e1b (diff)
downloadgitlab-ce-a7a9db803b983659e8804e07aee89c935473cc41.tar.gz
Merge branch 'dz-allow-nested-group-routing' into 'master'
Add nested groups support to the routing ## What does this MR do? It allows routing with `/` in namespace name ## Why was this MR needed? For nested groups feature(https://gitlab.com/gitlab-org/gitlab-ce/issues/2772). We need URI like `/group/subgroup/project` be routed correctly ## Does this MR meet the acceptance criteria? - [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added - ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~ - ~~API support added~~ - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if it does - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? https://gitlab.com/gitlab-org/gitlab-ce/issues/2772 See merge request !7459
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 2713c0f1dc8..bcc0b17bce2 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -49,6 +49,14 @@ class ApplicationController < ActionController::Base
render_404
end
+ def route_not_found
+ if current_user
+ not_found
+ else
+ redirect_to new_user_session_path
+ end
+ end
+
protected
# This filter handles both private tokens and personal access tokens