Commit bcea7ba3 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'namespace-route' into 'master'

Namespace route

Fixes #1312
parents 0d13abb1 3dc0bce9
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
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment