Commit c9f24697 authored by Dmytro Zaporozhets (DZ)'s avatar Dmytro Zaporozhets (DZ)

Merge branch 'dblessing_remove_profile_redirect' into 'master'

Remove legacy profile routes

See merge request gitlab-org/gitlab!63566
parents 2abc6539 d7efa70a
...@@ -293,7 +293,7 @@ Rails.application.routes.draw do ...@@ -293,7 +293,7 @@ Rails.application.routes.draw do
format: false, format: false,
constraints: { id: /\d+/ } constraints: { id: /\d+/ }
Gitlab::Routing.redirect_legacy_paths(self, :profile, :snippets) Gitlab::Routing.redirect_legacy_paths(self, :snippets)
end end
Gitlab.ee do Gitlab.ee do
......
...@@ -24,7 +24,7 @@ want to enforce everyone to set up 2FA, you can choose from two different ways: ...@@ -24,7 +24,7 @@ want to enforce everyone to set up 2FA, you can choose from two different ways:
- Suggest on next login, but allow a grace period before enforcing. - Suggest on next login, but allow a grace period before enforcing.
After the configured grace period has elapsed, users can sign in but After the configured grace period has elapsed, users can sign in but
cannot leave the 2FA configuration area at `/profile/two_factor_auth`. cannot leave the 2FA configuration area at `/-/profile/two_factor_auth`.
To enable 2FA for all users: To enable 2FA for all users:
......
...@@ -291,7 +291,7 @@ Quotas apply to: ...@@ -291,7 +291,7 @@ Quotas apply to:
1. In the top-right corner, select your avatar. 1. In the top-right corner, select your avatar.
1. Select **Edit profile**. 1. Select **Edit profile**.
1. In the left sidebar, select **[Usage Quotas](https://gitlab.com/profile/usage_quotas#pipelines-quota-tab)**. 1. In the left sidebar, select **[Usage Quotas](https://gitlab.com/-/profile/usage_quotas#pipelines-quota-tab)**.
Only pipeline minutes for GitLab shared runners are restricted. If you have a Only pipeline minutes for GitLab shared runners are restricted. If you have a
specific runner set up for your projects, there is no limit to your build time on GitLab SaaS. specific runner set up for your projects, there is no limit to your build time on GitLab SaaS.
......
...@@ -25,7 +25,7 @@ The simplest way to enable the GitLab Slack application for your workspace is to ...@@ -25,7 +25,7 @@ The simplest way to enable the GitLab Slack application for your workspace is to
install the [GitLab application](https://slack-platform.slack.com/apps/A676ADMV5-gitlab) from install the [GitLab application](https://slack-platform.slack.com/apps/A676ADMV5-gitlab) from
the [Slack App Directory](https://slack.com/apps). the [Slack App Directory](https://slack.com/apps).
Clicking install takes you to the [GitLab Slack application landing page](https://gitlab.com/profile/slack/edit) Clicking install takes you to the [GitLab Slack application landing page](https://gitlab.com/-/profile/slack/edit)
where you can select a project to enable the GitLab Slack application for. where you can select a project to enable the GitLab Slack application for.
![GitLab Slack application landing page](img/gitlab_slack_app_landing_page.png) ![GitLab Slack application landing page](img/gitlab_slack_app_landing_page.png)
......
...@@ -134,12 +134,10 @@ RSpec.describe ProfilesController, "routing" do ...@@ -134,12 +134,10 @@ RSpec.describe ProfilesController, "routing" do
it "to #account" do it "to #account" do
expect(get("/-/profile/account")).to route_to('profiles/accounts#show') expect(get("/-/profile/account")).to route_to('profiles/accounts#show')
end end
it_behaves_like 'redirecting a legacy path', '/profile/account', '/-/profile/account'
it "to #audit_log" do it "to #audit_log" do
expect(get("/-/profile/audit_log")).to route_to('profiles#audit_log') expect(get("/-/profile/audit_log")).to route_to('profiles#audit_log')
end end
it_behaves_like 'redirecting a legacy path', '/profile/audit_log', '/-/profile/audit_log'
it "to #reset_feed_token" do it "to #reset_feed_token" do
expect(put("/-/profile/reset_feed_token")).to route_to('profiles#reset_feed_token') expect(put("/-/profile/reset_feed_token")).to route_to('profiles#reset_feed_token')
...@@ -148,7 +146,6 @@ RSpec.describe ProfilesController, "routing" do ...@@ -148,7 +146,6 @@ RSpec.describe ProfilesController, "routing" do
it "to #show" do it "to #show" do
expect(get("/-/profile")).to route_to('profiles#show') expect(get("/-/profile")).to route_to('profiles#show')
end end
it_behaves_like 'redirecting a legacy path', '/profile', '/-/profile'
end end
# profile_preferences GET /-/profile/preferences(.:format) profiles/preferences#show # profile_preferences GET /-/profile/preferences(.:format) profiles/preferences#show
...@@ -158,7 +155,6 @@ RSpec.describe Profiles::PreferencesController, 'routing' do ...@@ -158,7 +155,6 @@ RSpec.describe Profiles::PreferencesController, 'routing' do
it 'to #show' do it 'to #show' do
expect(get('/-/profile/preferences')).to route_to('profiles/preferences#show') expect(get('/-/profile/preferences')).to route_to('profiles/preferences#show')
end end
it_behaves_like 'redirecting a legacy path', '/profile/preferences', '/-/profile/preferences'
it 'to #update' do it 'to #update' do
expect(put('/-/profile/preferences')).to route_to('profiles/preferences#update') expect(put('/-/profile/preferences')).to route_to('profiles/preferences#update')
...@@ -176,7 +172,6 @@ RSpec.describe Profiles::KeysController, "routing" do ...@@ -176,7 +172,6 @@ RSpec.describe Profiles::KeysController, "routing" do
it "to #index" do it "to #index" do
expect(get("/-/profile/keys")).to route_to('profiles/keys#index') expect(get("/-/profile/keys")).to route_to('profiles/keys#index')
end end
it_behaves_like 'redirecting a legacy path', '/profile/keys', '/-/profile/keys'
it "to #create" do it "to #create" do
expect(post("/-/profile/keys")).to route_to('profiles/keys#create') expect(post("/-/profile/keys")).to route_to('profiles/keys#create')
...@@ -185,7 +180,6 @@ RSpec.describe Profiles::KeysController, "routing" do ...@@ -185,7 +180,6 @@ RSpec.describe Profiles::KeysController, "routing" do
it "to #show" do it "to #show" do
expect(get("/-/profile/keys/1")).to route_to('profiles/keys#show', id: '1') expect(get("/-/profile/keys/1")).to route_to('profiles/keys#show', id: '1')
end end
it_behaves_like 'redirecting a legacy path', '/profile/keys/1', '/-/profile/keys/1'
it "to #destroy" do it "to #destroy" do
expect(delete("/-/profile/keys/1")).to route_to('profiles/keys#destroy', id: '1') expect(delete("/-/profile/keys/1")).to route_to('profiles/keys#destroy', id: '1')
...@@ -200,7 +194,6 @@ RSpec.describe Profiles::GpgKeysController, "routing" do ...@@ -200,7 +194,6 @@ RSpec.describe Profiles::GpgKeysController, "routing" do
it "to #index" do it "to #index" do
expect(get("/-/profile/gpg_keys")).to route_to('profiles/gpg_keys#index') expect(get("/-/profile/gpg_keys")).to route_to('profiles/gpg_keys#index')
end end
it_behaves_like 'redirecting a legacy path', '/profile/gpg_keys', '/-/profile/gpg_keys'
it "to #create" do it "to #create" do
expect(post("/-/profile/gpg_keys")).to route_to('profiles/gpg_keys#create') expect(post("/-/profile/gpg_keys")).to route_to('profiles/gpg_keys#create')
...@@ -218,7 +211,6 @@ RSpec.describe Profiles::EmailsController, "routing" do ...@@ -218,7 +211,6 @@ RSpec.describe Profiles::EmailsController, "routing" do
it "to #index" do it "to #index" do
expect(get("/-/profile/emails")).to route_to('profiles/emails#index') expect(get("/-/profile/emails")).to route_to('profiles/emails#index')
end end
it_behaves_like 'redirecting a legacy path', '/profile/emails', '/-/profile/emails'
it "to #create" do it "to #create" do
expect(post("/-/profile/emails")).to route_to('profiles/emails#create') expect(post("/-/profile/emails")).to route_to('profiles/emails#create')
......
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