Merge branch 'dz-remove-deprecated-user-routes' into 'master'
Remove deprecated user routes See merge request gitlab-org/gitlab-ce!30044
This commit is contained in:
commit
e688f3db66
|
@ -18,12 +18,12 @@ import UserOverviewBlock from './user_overview_block';
|
||||||
*
|
*
|
||||||
* <ul class="nav-links">
|
* <ul class="nav-links">
|
||||||
* <li class="activity-tab active">
|
* <li class="activity-tab active">
|
||||||
* <a data-action="activity" data-target="#activity" data-toggle="tab" href="/u/username">
|
* <a data-action="activity" data-target="#activity" data-toggle="tab" href="/username">
|
||||||
* Activity
|
* Activity
|
||||||
* </a>
|
* </a>
|
||||||
* </li>
|
* </li>
|
||||||
* <li class="groups-tab">
|
* <li class="groups-tab">
|
||||||
* <a data-action="groups" data-target="#groups" data-toggle="tab" href="/u/username/groups">
|
* <a data-action="groups" data-target="#groups" data-toggle="tab" href="/users/username/groups">
|
||||||
* Groups
|
* Groups
|
||||||
* </a>
|
* </a>
|
||||||
* </li>
|
* </li>
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Remove depreated /u/:username routing
|
||||||
|
merge_request: 30044
|
||||||
|
author:
|
||||||
|
type: removed
|
|
@ -17,5 +17,5 @@ resources :snippets, concerns: :awardable do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
get '/s/:username', to: redirect('u/%{username}/snippets'),
|
get '/s/:username', to: redirect('users/%{username}/snippets'),
|
||||||
constraints: { username: /[a-zA-Z.0-9_\-]+(?<!\.atom)/ }
|
constraints: { username: /[a-zA-Z.0-9_\-]+(?<!\.atom)/ }
|
||||||
|
|
|
@ -48,15 +48,6 @@ scope(constraints: { username: Gitlab::PathRegex.root_namespace_route_regex }) d
|
||||||
get :activity
|
get :activity
|
||||||
get '/', to: redirect('%{username}'), as: nil
|
get '/', to: redirect('%{username}'), as: nil
|
||||||
end
|
end
|
||||||
|
|
||||||
# Compatibility with old routing
|
|
||||||
# TODO (dzaporozhets): remove in 10.0
|
|
||||||
get '/u/:username', to: redirect('%{username}')
|
|
||||||
# TODO (dzaporozhets): remove in 9.0
|
|
||||||
get '/u/:username/groups', to: redirect('users/%{username}/groups')
|
|
||||||
get '/u/:username/projects', to: redirect('users/%{username}/projects')
|
|
||||||
get '/u/:username/snippets', to: redirect('users/%{username}/snippets')
|
|
||||||
get '/u/:username/contributed', to: redirect('users/%{username}/contributed')
|
|
||||||
end
|
end
|
||||||
|
|
||||||
constraints(::Constraints::UserUrlConstrainer.new) do
|
constraints(::Constraints::UserUrlConstrainer.new) do
|
||||||
|
|
|
@ -222,7 +222,7 @@ GET /projects/:id/merge_requests/:merge_request_iid/approvals
|
||||||
"id": 1,
|
"id": 1,
|
||||||
"state": "active",
|
"state": "active",
|
||||||
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon",
|
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon",
|
||||||
"web_url": "http://localhost:3000/u/root"
|
"web_url": "http://localhost:3000/root"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -314,7 +314,7 @@ PUT /projects/:id/merge_requests/:merge_request_iid/approvers
|
||||||
"id": 1,
|
"id": 1,
|
||||||
"state": "active",
|
"state": "active",
|
||||||
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon",
|
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon",
|
||||||
"web_url": "http://localhost:3000/u/root"
|
"web_url": "http://localhost:3000/root"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -387,7 +387,7 @@ does not match, the response code will be `409`.
|
||||||
"id": 1,
|
"id": 1,
|
||||||
"state": "active",
|
"state": "active",
|
||||||
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon",
|
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon",
|
||||||
"web_url": "http://localhost:3000/u/root"
|
"web_url": "http://localhost:3000/root"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -397,7 +397,7 @@ does not match, the response code will be `409`.
|
||||||
"id": 2,
|
"id": 2,
|
||||||
"state": "active",
|
"state": "active",
|
||||||
"avatar_url": "http://www.gravatar.com/avatar/cf7ad14b34162a76d593e3affca2adca?s=80\u0026d=identicon",
|
"avatar_url": "http://www.gravatar.com/avatar/cf7ad14b34162a76d593e3affca2adca?s=80\u0026d=identicon",
|
||||||
"web_url": "http://localhost:3000/u/ryley"
|
"web_url": "http://localhost:3000/ryley"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
|
@ -9,11 +9,11 @@ title: University | Process
|
||||||
# Suggesting improvements
|
# Suggesting improvements
|
||||||
|
|
||||||
If you would like to teach a class or participate or help in any way please
|
If you would like to teach a class or participate or help in any way please
|
||||||
submit a merge request and assign it to [Job](https://gitlab.com/u/JobV).
|
submit a merge request and assign it to [Job](https://gitlab.com/JobV).
|
||||||
|
|
||||||
If you have suggestions for additional courses you would like to see,
|
If you have suggestions for additional courses you would like to see,
|
||||||
please submit a merge request to add an upcoming class, assign to
|
please submit a merge request to add an upcoming class, assign to
|
||||||
[Chad](https://gitlab.com/u/chadmalchow) and /cc [Job](https://gitlab.com/u/JobV).
|
[Chad](https://gitlab.com/chadmalchow) and /cc [Job](https://gitlab.com/JobV).
|
||||||
|
|
||||||
## Adding classes
|
## Adding classes
|
||||||
|
|
||||||
|
@ -31,4 +31,4 @@ please submit a merge request to add an upcoming class, assign to
|
||||||
1. Please upload any video recordings to our Youtube channel. We prefer them to
|
1. Please upload any video recordings to our Youtube channel. We prefer them to
|
||||||
be public, if needed they can be unlisted but if so they should be linked from
|
be public, if needed they can be unlisted but if so they should be linked from
|
||||||
this page.
|
this page.
|
||||||
1. Please create a merge request and assign to [Erica](https://gitlab.com/u/Erica).
|
1. Please create a merge request and assign to [Erica](https://gitlab.com/Erica).
|
||||||
|
|
|
@ -53,7 +53,6 @@ module Gitlab
|
||||||
sent_notifications
|
sent_notifications
|
||||||
slash-command-logo.png
|
slash-command-logo.png
|
||||||
snippets
|
snippets
|
||||||
u
|
|
||||||
unsubscribes
|
unsubscribes
|
||||||
uploads
|
uploads
|
||||||
users
|
users
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
# user GET /u/:username/
|
# user GET /users/:username/
|
||||||
# user_groups GET /u/:username/groups(.:format)
|
# user_groups GET /users/:username/groups(.:format)
|
||||||
# user_projects GET /u/:username/projects(.:format)
|
# user_projects GET /users/:username/projects(.:format)
|
||||||
# user_contributed_projects GET /u/:username/contributed(.:format)
|
# user_contributed_projects GET /users/:username/contributed(.:format)
|
||||||
# user_snippets GET /u/:username/snippets(.:format)
|
# user_snippets GET /users/:username/snippets(.:format)
|
||||||
# user_calendar GET /u/:username/calendar(.:format)
|
# user_calendar GET /users/:username/calendar(.:format)
|
||||||
# user_calendar_activities GET /u/:username/calendar_activities(.:format)
|
# user_calendar_activities GET /users/:username/calendar_activities(.:format)
|
||||||
describe UsersController, "routing" do
|
describe UsersController, "routing" do
|
||||||
it "to #show" do
|
it "to #show" do
|
||||||
allow_any_instance_of(::Constraints::UserUrlConstrainer).to receive(:matches?).and_return(true)
|
allow_any_instance_of(::Constraints::UserUrlConstrainer).to receive(:matches?).and_return(true)
|
||||||
|
@ -37,22 +37,6 @@ describe UsersController, "routing" do
|
||||||
it "to #calendar_activities" do
|
it "to #calendar_activities" do
|
||||||
expect(get("/users/User/calendar_activities")).to route_to('users#calendar_activities', username: 'User')
|
expect(get("/users/User/calendar_activities")).to route_to('users#calendar_activities', username: 'User')
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'redirect alias routes' do
|
|
||||||
include RSpec::Rails::RequestExampleGroup
|
|
||||||
|
|
||||||
it '/u/user1 redirects to /user1' do
|
|
||||||
expect(get("/u/user1")).to redirect_to('/user1')
|
|
||||||
end
|
|
||||||
|
|
||||||
it '/u/user1/groups redirects to /user1/groups' do
|
|
||||||
expect(get("/u/user1/groups")).to redirect_to('/users/user1/groups')
|
|
||||||
end
|
|
||||||
|
|
||||||
it '/u/user1/projects redirects to /user1/projects' do
|
|
||||||
expect(get("/u/user1/projects")).to redirect_to('/users/user1/projects')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# search GET /search(.:format) search#show
|
# search GET /search(.:format) search#show
|
||||||
|
|
|
@ -25,7 +25,7 @@ module JiraServiceHelper
|
||||||
\"32x32\":\"http://0.0.0.0:4567/secure/useravatar?size=medium&avatarId=10122\",
|
\"32x32\":\"http://0.0.0.0:4567/secure/useravatar?size=medium&avatarId=10122\",
|
||||||
\"48x48\":\"http://0.0.0.0:4567/secure/useravatar?avatarId=10122\"},
|
\"48x48\":\"http://0.0.0.0:4567/secure/useravatar?avatarId=10122\"},
|
||||||
\"displayName\":\"GitLab\",\"active\":true},
|
\"displayName\":\"GitLab\",\"active\":true},
|
||||||
\"body\":\"[Administrator|http://localhost:3000/u/root] mentioned JIRA-1 in Merge request of [gitlab-org/gitlab-test|http://localhost:3000/gitlab-org/gitlab-test/merge_requests/2].\",
|
\"body\":\"[Administrator|http://localhost:3000/root] mentioned JIRA-1 in Merge request of [gitlab-org/gitlab-test|http://localhost:3000/gitlab-org/gitlab-test/merge_requests/2].\",
|
||||||
\"updateAuthor\":{\"self\":\"http://0.0.0.0:4567/rest/api/2/user?username=gitlab\",\"name\":\"gitlab\",\"emailAddress\":\"gitlab@example.com\",
|
\"updateAuthor\":{\"self\":\"http://0.0.0.0:4567/rest/api/2/user?username=gitlab\",\"name\":\"gitlab\",\"emailAddress\":\"gitlab@example.com\",
|
||||||
\"avatarUrls\":{\"16x16\":\"http://0.0.0.0:4567/secure/useravatar?size=xsmall&avatarId=10122\",
|
\"avatarUrls\":{\"16x16\":\"http://0.0.0.0:4567/secure/useravatar?size=xsmall&avatarId=10122\",
|
||||||
\"24x24\":\"http://0.0.0.0:4567/secure/useravatar?size=small&avatarId=10122\",
|
\"24x24\":\"http://0.0.0.0:4567/secure/useravatar?size=small&avatarId=10122\",
|
||||||
|
@ -40,7 +40,7 @@ module JiraServiceHelper
|
||||||
\"24x24\":\"http://0.0.0.0:4567/secure/useravatar?size=small&avatarId=10122\",
|
\"24x24\":\"http://0.0.0.0:4567/secure/useravatar?size=small&avatarId=10122\",
|
||||||
\"32x32\":\"http://0.0.0.0:4567/secure/useravatar?size=medium&avatarId=10122\",
|
\"32x32\":\"http://0.0.0.0:4567/secure/useravatar?size=medium&avatarId=10122\",
|
||||||
\"48x48\":\"http://0.0.0.0:4567/secure/useravatar?avatarId=10122\"},\"displayName\":\"GitLab\",\"active\":true},
|
\"48x48\":\"http://0.0.0.0:4567/secure/useravatar?avatarId=10122\"},\"displayName\":\"GitLab\",\"active\":true},
|
||||||
\"body\":\"[Administrator|http://localhost:3000/u/root] mentioned this issue in [a commit of h5bp/html5-boilerplate|http://localhost:3000/h5bp/html5-boilerplate/commit/2439f77897122fbeee3bfd9bb692d3608848433e].\",
|
\"body\":\"[Administrator|http://localhost:3000/root] mentioned this issue in [a commit of h5bp/html5-boilerplate|http://localhost:3000/h5bp/html5-boilerplate/commit/2439f77897122fbeee3bfd9bb692d3608848433e].\",
|
||||||
\"updateAuthor\":{\"self\":\"http://0.0.0.0:4567/rest/api/2/user?username=gitlab\",\"name\":\"gitlab\",\"emailAddress\":\"gitlab@example.com\",
|
\"updateAuthor\":{\"self\":\"http://0.0.0.0:4567/rest/api/2/user?username=gitlab\",\"name\":\"gitlab\",\"emailAddress\":\"gitlab@example.com\",
|
||||||
\"avatarUrls\":{\"16x16\":\"http://0.0.0.0:4567/secure/useravatar?size=xsmall&avatarId=10122\",
|
\"avatarUrls\":{\"16x16\":\"http://0.0.0.0:4567/secure/useravatar?size=xsmall&avatarId=10122\",
|
||||||
\"24x24\":\"http://0.0.0.0:4567/secure/useravatar?size=small&avatarId=10122\",
|
\"24x24\":\"http://0.0.0.0:4567/secure/useravatar?size=small&avatarId=10122\",
|
||||||
|
|
Loading…
Reference in New Issue