From 3551a625a876da47d32e808aae2cd94043d4ffcd Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Fri, 6 Jan 2017 11:02:33 +0200 Subject: [PATCH] Whitelist next project names: assets, profile, public Signed-off-by: Dmitriy Zaporozhets --- app/validators/project_path_validator.rb | 2 +- changelogs/unreleased/dz-whitelist-some-project-names.yml | 4 ++++ .../20161221153951_rename_reserved_project_names.rb | 5 ----- 3 files changed, 5 insertions(+), 6 deletions(-) create mode 100644 changelogs/unreleased/dz-whitelist-some-project-names.yml diff --git a/app/validators/project_path_validator.rb b/app/validators/project_path_validator.rb index aec0d0ce44e..36279daa743 100644 --- a/app/validators/project_path_validator.rb +++ b/app/validators/project_path_validator.rb @@ -15,7 +15,7 @@ class ProjectPathValidator < ActiveModel::EachValidator # 'tree' as project name and 'deploy_keys' as route. # RESERVED = (NamespaceValidator::RESERVED - - %w[dashboard help ci admin search notes services] + + %w[dashboard help ci admin search notes services assets profile public] + %w[tree commits wikis new edit create update logs_tree preview blob blame raw files create_dir find_file]).freeze diff --git a/changelogs/unreleased/dz-whitelist-some-project-names.yml b/changelogs/unreleased/dz-whitelist-some-project-names.yml new file mode 100644 index 00000000000..92383646f62 --- /dev/null +++ b/changelogs/unreleased/dz-whitelist-some-project-names.yml @@ -0,0 +1,4 @@ +--- +title: 'Whitelist next project names: assets, profile, public' +merge_request: 8470 +author: diff --git a/db/post_migrate/20161221153951_rename_reserved_project_names.rb b/db/post_migrate/20161221153951_rename_reserved_project_names.rb index 7f7c2424a5c..282837be1fa 100644 --- a/db/post_migrate/20161221153951_rename_reserved_project_names.rb +++ b/db/post_migrate/20161221153951_rename_reserved_project_names.rb @@ -10,7 +10,6 @@ class RenameReservedProjectNames < ActiveRecord::Migration KNOWN_PATHS = %w(.well-known all - assets blame blob commits @@ -18,7 +17,6 @@ class RenameReservedProjectNames < ActiveRecord::Migration create_dir edit files - files find_file groups hooks @@ -26,11 +24,8 @@ class RenameReservedProjectNames < ActiveRecord::Migration logs_tree merge_requests new - new preview - profile projects - public raw repository robots.txt