mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-20 10:06:04 +10:00
Merge branch 'namespace-route' into 'master'
Namespace route Fixes #1312
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
class NamespacesController < ApplicationController
|
||||
skip_before_filter :authenticate_user!
|
||||
|
||||
def show
|
||||
namespace = Namespace.find_by(path: params[:id])
|
||||
|
||||
unless namespace
|
||||
return render_404
|
||||
end
|
||||
|
||||
if namespace.type == "Group"
|
||||
redirect_to group_path(namespace)
|
||||
else
|
||||
redirect_to user_path(namespace.owner)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
+1
-1
@@ -315,7 +315,7 @@ Gitlab::Application.routes.draw do
|
||||
end
|
||||
end
|
||||
|
||||
get ':id' => "groups#show", constraints: {id: /(?:[^.]|\.(?!atom$))+/, format: /atom/}
|
||||
get ':id' => "namespaces#show", constraints: {id: /(?:[^.]|\.(?!atom$))+/, format: /atom/}
|
||||
|
||||
root to: "dashboard#show"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user