Commit 2fdc7c1f authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch 'dz-reserve-v2-root-path' into 'master'

Add v2 to reserved top level routes

See merge request gitlab-org/gitlab-ce!26540
parents 7af1ba12 9f3f45bf
# frozen_string_literal: true
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class RenameV2RootNamespaces < ActiveRecord::Migration[5.0]
include Gitlab::Database::MigrationHelpers
include Gitlab::Database::RenameReservedPathsMigration::V1
DOWNTIME = false
disable_ddl_transaction!
# We're taking over the /v2 namespace as it necessary for Docker client to
# work with GitLab as Dependency proxy for containers.
def up
disable_statement_timeout do
rename_root_paths 'v2'
end
end
def down
disable_statement_timeout do
revert_renames
end
end
end
......@@ -83,6 +83,7 @@ Currently the following names are reserved as top level groups:
- unsubscribes
- uploads
- users
- v2
These group names are unavailable as subgroup names:
......
......@@ -57,6 +57,7 @@ module Gitlab
unsubscribes
uploads
users
v2
].freeze
# This list should contain all words following `/*namespace_id/:project_id` in
......
......@@ -100,7 +100,7 @@ describe Gitlab::PathRegex do
end
let(:ee_top_level_words) do
['unsubscribes']
%w(unsubscribes v2)
end
let(:files_in_public) do
......
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