From 0c872e02b2c822e3397515ec324051ff540f0cd5 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 20 Dec 2022 14:22:11 +0000 Subject: Add latest changes from gitlab-org/gitlab@15-7-stable-ee --- config/routes/group.rb | 2 ++ config/routes/merge_requests.rb | 3 ++- config/routes/project.rb | 1 + config/routes/user.rb | 16 ++++++++++++++++ 4 files changed, 21 insertions(+), 1 deletion(-) (limited to 'config/routes') 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 -- cgit v1.2.3