diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-18 13:50:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-18 13:50:51 +0300 |
commit | db384e6b19af03b4c3c82a5760d83a3fd79f7982 (patch) | |
tree | 34beaef37df5f47ccbcf5729d7583aae093cffa0 /config/routes | |
parent | 54fd7b1bad233e3944434da91d257fa7f63c3996 (diff) |
Add latest changes from gitlab-org/gitlab@16-3-stable-eev16.3.0-rc42
Diffstat (limited to 'config/routes')
-rw-r--r-- | config/routes/admin.rb | 6 | ||||
-rw-r--r-- | config/routes/group.rb | 2 | ||||
-rw-r--r-- | config/routes/merge_requests.rb | 7 | ||||
-rw-r--r-- | config/routes/project.rb | 31 | ||||
-rw-r--r-- | config/routes/repository.rb | 2 | ||||
-rw-r--r-- | config/routes/user.rb | 1 |
6 files changed, 22 insertions, 27 deletions
diff --git a/config/routes/admin.rb b/config/routes/admin.rb index 0123bf0627c..5513ac1813a 100644 --- a/config/routes/admin.rb +++ b/config/routes/admin.rb @@ -35,7 +35,11 @@ namespace :admin do resource :impersonation, only: :destroy - resources :abuse_reports, only: [:index, :show, :update, :destroy] + resources :abuse_reports, only: [:index, :show, :update, :destroy] do + member do + put :moderate_user + end + end resources :gitaly_servers, only: [:index] resources :spam_logs, only: [:index, :destroy] do diff --git a/config/routes/group.rb b/config/routes/group.rb index 9b346867f78..16371fca89e 100644 --- a/config/routes/group.rb +++ b/config/routes/group.rb @@ -160,6 +160,8 @@ constraints(::Constraints::GroupUrlConstrainer.new) do end resources :achievements, only: [:index, :new, :edit] + + resources :work_items, only: [:index] end scope( diff --git a/config/routes/merge_requests.rb b/config/routes/merge_requests.rb index 0f973867068..adfc9bcd19b 100644 --- a/config/routes/merge_requests.rb +++ b/config/routes/merge_requests.rb @@ -55,13 +55,6 @@ resources :merge_requests, concerns: :awardable, except: [:new, :create, :show], post :export_csv end - resources :discussions, only: [:show], constraints: { id: /\h{40}/ } do - member do - post :resolve - delete :resolve, action: :unresolve - end - end - scope module: :merge_requests do resources :drafts, only: [:index, :update, :create, :destroy] do collection do diff --git a/config/routes/project.rb b/config/routes/project.rb index 73e4ed2fb8b..250371d1257 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -30,12 +30,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do scope '-' do get 'archive/*id', format: true, constraints: { format: Gitlab::PathRegex.archive_formats_regex, id: /.+?/ }, to: 'repositories#archive', as: 'archive' - namespace :metrics, module: :metrics do - namespace :dashboards do - post :builder, to: 'builder#panel_preview' - end - end - namespace :security do resource :configuration, only: [:show], controller: :configuration do resource :sast, only: [:show], controller: :sast_configuration @@ -343,14 +337,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do end end - namespace :performance_monitoring do - resources :dashboards, only: [:create] do - collection do - put '/:file_name', to: 'dashboards#update', constraints: { file_name: /.+\.yml/ } - end - end - end - resources :alert_management, only: [:index] do member do get 'details(/*page)', to: 'alert_management#details', as: 'details' @@ -399,7 +385,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do end end - resources :tracing, only: [:index], controller: :tracing + resources :tracing, only: [:index, :show], controller: :tracing namespace :design_management do namespace :designs, path: 'designs/:design_id(/:sha)', constraints: -> (params) { params[:sha].nil? || Gitlab::Git.commit_id?(params[:sha]) } do @@ -488,6 +474,15 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do namespace :service_desk do resource :custom_email, only: [:show, :create, :update, :destroy], controller: 'custom_email' end + + scope path: ':noteable_type/:noteable_id' do + resources :discussions, only: [:show], constraints: { id: /\h{40}/ } do + member do + post :resolve + delete :resolve, action: :unresolve + end + end + end end # End of the /-/ scope. @@ -497,8 +492,8 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do # # Service Desk # - get '/service_desk' => 'service_desk#show', as: :service_desk # rubocop:todo Cop/PutProjectRoutesUnderScope - put '/service_desk' => 'service_desk#update', as: :service_desk_refresh # rubocop:todo Cop/PutProjectRoutesUnderScope + get '/service_desk' => 'service_desk#show' # rubocop:todo Cop/PutProjectRoutesUnderScope + put '/service_desk' => 'service_desk#update' # rubocop:todo Cop/PutProjectRoutesUnderScope # # Templates @@ -689,7 +684,7 @@ scope path: '(/-/jira)', constraints: ::Constraints::JiraEncodedUrlConstrainer.n ) } - get 'commit/:id', constraints: { id: /\h{7,40}/ }, to: redirect { |params, req| + get 'commit/:id', constraints: { id: Gitlab::Git::Commit::SHA_PATTERN }, to: redirect { |params, req| project_full_path = ::Gitlab::Jira::Dvcs.restore_full_path( namespace: params[:namespace_id], project: params[:project_id] diff --git a/config/routes/repository.rb b/config/routes/repository.rb index 08aa113685a..fc66cb4d6d3 100644 --- a/config/routes/repository.rb +++ b/config/routes/repository.rb @@ -92,7 +92,7 @@ scope format: false do end end -resources :commit, only: [:show], constraints: { id: /\h{7,40}/ } do +resources :commit, only: [:show], constraints: { id: Gitlab::Git::Commit::SHA_PATTERN } do member do get :branches get :pipelines diff --git a/config/routes/user.rb b/config/routes/user.rb index 5723421cad2..c66f4872b21 100644 --- a/config/routes/user.rb +++ b/config/routes/user.rb @@ -55,6 +55,7 @@ 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' + patch '/users/update_email', to: 'sessions#update_email' # 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 |