Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-12-20 17:22:11 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-12-20 17:22:11 +0300
commit0c872e02b2c822e3397515ec324051ff540f0cd5 (patch)
treece2fb6ce7030e4dad0f4118d21ab6453e5938cdd /config/routes
parentf7e05a6853b12f02911494c4b3fe53d9540d74fc (diff)
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
Diffstat (limited to 'config/routes')
-rw-r--r--config/routes/group.rb2
-rw-r--r--config/routes/merge_requests.rb3
-rw-r--r--config/routes/project.rb1
-rw-r--r--config/routes/user.rb16
4 files changed, 21 insertions, 1 deletions
diff --git a/config/routes/group.rb b/config/routes/group.rb
index a715596580d..819db0bb6b1 100644
--- a/config/routes/group.rb
+++ b/config/routes/group.rb
@@ -61,6 +61,8 @@ constraints(::Constraints::GroupUrlConstrainer.new) do
resource :packages_and_registries, only: [:show]
end
+ resources :usage_quotas, only: [:index]
+
resource :variables, only: [:show, :update]
resources :children, only: [:index]
diff --git a/config/routes/merge_requests.rb b/config/routes/merge_requests.rb
index b0bab1717a6..29e0d65b58c 100644
--- a/config/routes/merge_requests.rb
+++ b/config/routes/merge_requests.rb
@@ -34,7 +34,7 @@ resources :merge_requests, concerns: :awardable, except: [:new, :create, :show],
scope action: :show do
get :commits, defaults: { tab: 'commits' }
get :pipelines, defaults: { tab: 'pipelines' }
- get :diffs, defaults: { tab: 'diffs' }
+ get :diffs, to: 'merge_requests#diffs', defaults: { tab: 'diffs' }
end
get :diff_for_path, controller: 'merge_requests/diffs'
@@ -78,6 +78,7 @@ scope path: 'merge_requests', controller: 'merge_requests/creations' do
scope constraints: ->(req) { req.format == :json }, as: :json do
get :diffs
get :pipelines
+ get :target_projects
end
scope action: :new do
diff --git a/config/routes/project.rb b/config/routes/project.rb
index 5a85a029607..798829484da 100644
--- a/config/routes/project.rb
+++ b/config/routes/project.rb
@@ -475,6 +475,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
namespace :ml do
resources :experiments, only: [:index, :show], controller: 'experiments'
+ resources :candidates, only: [:show], controller: 'candidates', param: :iid
end
end
# End of the /-/ scope.
diff --git a/config/routes/user.rb b/config/routes/user.rb
index 0c1bc1956a9..1c122ea0c94 100644
--- a/config/routes/user.rb
+++ b/config/routes/user.rb
@@ -55,6 +55,22 @@ devise_scope :user do
get '/users/almost_there' => 'confirmations#almost_there'
post '/users/resend_verification_code', to: 'sessions#resend_verification_code'
get '/users/successful_verification', to: 'sessions#successful_verification'
+
+ # Redirect on GitHub authorization request errors. E.g. it could happen when user:
+ # 1. cancel authorization the GitLab OAuth app via GitHub to import GitHub repos
+ # (they'll be redirected to /projects/new#import_project)
+ # 2. cancel signing in to GitLab using GitHub account
+ # (they'll be redirected to /users/sign_in)
+ # In these cases, GitHub redirects user to the GitLab OAuth app's
+ # registered callback URL - /users/auth, which is the url to the auth user's profile page
+ get '/users/auth',
+ constraints: ->(req) {
+ req.params[:error].present? && req.params[:state].present?
+ },
+ to: redirect { |_params, req|
+ redirect_path = req.session.delete(:auth_on_failure_path)
+ redirect_path || Rails.application.routes.url_helpers.new_user_session_path
+ }
end
scope '-/users', module: :users do