Commit 8ea10016 authored by Alex Kalderimis's avatar Alex Kalderimis

Merge branch 'dz-remove-deprecated-global-routes' into 'master'

Remove deprecated global routes

See merge request gitlab-org/gitlab!34295
parents 1c848436 a9688b34
---
title: Remove some deprecated global routes
merge_request: 34295
author:
type: removed
......@@ -252,38 +252,6 @@ Rails.application.routes.draw do
end
end
# Deprecated routes.
# Will be removed as part of https://gitlab.com/gitlab-org/gitlab/-/issues/210024
scope as: :deprecated do
# Autocomplete
get '/autocomplete/users' => 'autocomplete#users'
get '/autocomplete/users/:id' => 'autocomplete#user'
get '/autocomplete/projects' => 'autocomplete#projects'
get '/autocomplete/award_emojis' => 'autocomplete#award_emojis'
get '/autocomplete/merge_request_target_branches' => 'autocomplete#merge_request_target_branches'
Gitlab.ee do
get '/autocomplete/project_groups' => 'autocomplete#project_groups'
get '/autocomplete/project_routes' => 'autocomplete#project_routes'
get '/autocomplete/namespace_routes' => 'autocomplete#namespace_routes'
end
resources :invites, only: [:show], constraints: { id: /[A-Za-z0-9_-]+/ } do
member do
post :accept
match :decline, via: [:get, :post]
end
end
resources :sent_notifications, only: [], constraints: { id: /\h{32}/ } do
member do
get :unsubscribe
end
end
resources :abuse_reports, only: [:new, :create]
end
resources :groups, only: [:index, :new, :create] do
post :preview_markdown
end
......
......@@ -54,13 +54,11 @@ Currently the following names are reserved as top level groups:
- `500.html`
- `502.html`
- `503.html`
- `abuse_reports`
- `admin`
- `api`
- `apple-touch-icon-precomposed.png`
- `apple-touch-icon.png`
- `assets`
- `autocomplete`
- `dashboard`
- `deploy.html`
- `explore`
......@@ -71,7 +69,6 @@ Currently the following names are reserved as top level groups:
- `health_check`
- `help`
- `import`
- `invites`
- `jwt`
- `login`
- `oauth`
......@@ -81,7 +78,6 @@ Currently the following names are reserved as top level groups:
- `robots.txt`
- `s`
- `search`
- `sent_notifications`
- `sitemap`
- `sitemap.xml`
- `sitemap.xml.gz`
......
......@@ -21,13 +21,11 @@ module Gitlab
500.html
502.html
503.html
abuse_reports
admin
api
apple-touch-icon-precomposed.png
apple-touch-icon.png
assets
autocomplete
dashboard
deploy.html
explore
......@@ -38,7 +36,6 @@ module Gitlab
health_check
help
import
invites
jwt
login
oauth
......@@ -48,7 +45,6 @@ module Gitlab
robots.txt
s
search
sent_notifications
sitemap
sitemap.xml
sitemap.xml.gz
......
......@@ -183,7 +183,7 @@ RSpec.describe Gitlab::PathRegex do
# We ban new items in this list, see https://gitlab.com/gitlab-org/gitlab/-/issues/215362
it 'does not allow expansion' do
expect(described_class::TOP_LEVEL_ROUTES.size).to eq(44)
expect(described_class::TOP_LEVEL_ROUTES.size).to eq(40)
end
end
......
......@@ -335,10 +335,6 @@ RSpec.describe InvitesController, 'routing' do
it 'to #show' do
expect(get("/-/invites/#{member.invite_token}")).to route_to('invites#show', id: member.invite_token)
end
it 'to legacy route' do
expect(get("/invites/#{member.invite_token}")).to route_to('invites#show', id: member.invite_token)
end
end
RSpec.describe AbuseReportsController, 'routing' do
......@@ -347,10 +343,6 @@ RSpec.describe AbuseReportsController, 'routing' do
it 'to #new' do
expect(get("/-/abuse_reports/new?user_id=#{user.id}")).to route_to('abuse_reports#new', user_id: user.id.to_s)
end
it 'to legacy route' do
expect(get("/abuse_reports/new?user_id=#{user.id}")).to route_to('abuse_reports#new', user_id: user.id.to_s)
end
end
RSpec.describe SentNotificationsController, 'routing' do
......@@ -376,12 +368,6 @@ RSpec.describe AutocompleteController, 'routing' do
it 'to #merge_request_target_branches' do
expect(get("/-/autocomplete/merge_request_target_branches")).to route_to('autocomplete#merge_request_target_branches')
end
it 'to legacy route' do
expect(get("/autocomplete/users")).to route_to('autocomplete#users')
expect(get("/autocomplete/projects")).to route_to('autocomplete#projects')
expect(get("/autocomplete/award_emojis")).to route_to('autocomplete#award_emojis')
end
end
RSpec.describe Snippets::BlobsController, "routing" 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