Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
9f3f45bf
Commit
9f3f45bf
authored
Mar 25, 2019
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add v2 to reserved top level routes
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
7aa26dee
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
1 deletion
+30
-1
db/post_migrate/20190325111602_rename_v2_root_namespaces.rb
db/post_migrate/20190325111602_rename_v2_root_namespaces.rb
+27
-0
doc/user/reserved_names.md
doc/user/reserved_names.md
+1
-0
lib/gitlab/path_regex.rb
lib/gitlab/path_regex.rb
+1
-0
spec/lib/gitlab/path_regex_spec.rb
spec/lib/gitlab/path_regex_spec.rb
+1
-1
No files found.
db/post_migrate/20190325111602_rename_v2_root_namespaces.rb
0 → 100644
View file @
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
doc/user/reserved_names.md
View file @
9f3f45bf
...
...
@@ -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:
...
...
lib/gitlab/path_regex.rb
View file @
9f3f45bf
...
...
@@ -57,6 +57,7 @@ module Gitlab
unsubscribes
uploads
users
v2
]
.
freeze
# This list should contain all words following `/*namespace_id/:project_id` in
...
...
spec/lib/gitlab/path_regex_spec.rb
View file @
9f3f45bf
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment