From a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 16 Jun 2021 18:25:58 +0000 Subject: Add latest changes from gitlab-org/gitlab@14-0-stable-ee --- config/routes/project.rb | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'config/routes/project.rb') diff --git a/config/routes/project.rb b/config/routes/project.rb index d62e2f1b2f2..641ca399547 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -50,7 +50,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do end end - resources :infrastructure_registry, only: [:index], module: :packages + resources :infrastructure_registry, only: [:index, :show], module: :packages resources :jobs, only: [:index, :show], constraints: { id: /\d+/ } do collection do @@ -273,6 +273,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do resources :value_streams, only: [:index] do resources :stages, only: [:index] end + resource :summary, controller: :summary, only: :show end end @@ -385,7 +386,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do # The wiki and repository routing contains wildcard characters so # its preferable to keep it below all other project routes - draw :repository_scoped draw :repository draw :wiki @@ -404,7 +404,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do resource :feature_flags_client, only: [] do post :reset_token end - resources :feature_flags_user_lists, param: :iid, only: [:new, :edit, :show] + resources :feature_flags_user_lists, param: :iid, only: [:index, :new, :edit, :show] get '/schema/:branch/*filename', to: 'web_ide_schemas#show', @@ -566,15 +566,15 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do # Deprecated unscoped routing. scope as: 'deprecated' do # Issue https://gitlab.com/gitlab-org/gitlab/issues/118849 - draw :repository + draw :repository_deprecated - # Issue https://gitlab.com/gitlab-org/gitlab/-/issues/29572 - resources :snippets, concerns: :awardable, constraints: { id: /\d+/ } do # rubocop: disable Cop/PutProjectRoutesUnderScope - member do - get :raw # rubocop:todo Cop/PutProjectRoutesUnderScope - post :mark_as_spam # rubocop:todo Cop/PutProjectRoutesUnderScope - end - end + # Issue https://gitlab.com/gitlab-org/gitlab/-/issues/223719 + # rubocop: disable Cop/PutProjectRoutesUnderScope + get '/snippets/:id/raw', + to: 'snippets#raw', + format: false, + constraints: { id: /\d+/ } + # rubocop: enable Cop/PutProjectRoutesUnderScope end # All new routes should go under /-/ scope. @@ -584,12 +584,13 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do # Introduced in 12.0. # Should be removed with https://gitlab.com/gitlab-org/gitlab/issues/28848. Gitlab::Routing.redirect_legacy_paths(self, :mirror, :tags, :hooks, + :commits, :commit, :find_file, :files, :compare, :cycle_analytics, :mattermost, :variables, :triggers, :environments, :protected_environments, :error_tracking, :alert_management, :tracing, :serverless, :clusters, :audit_events, :wikis, :merge_requests, :vulnerability_feedback, :security, :dependencies, :issues, - :pipelines, :pipeline_schedules) + :pipelines, :pipeline_schedules, :snippets) end # rubocop: disable Cop/PutProjectRoutesUnderScope -- cgit v1.2.3