diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-08 15:06:21 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-08 15:06:21 +0000 |
commit | 759bab058520a21d87087355dc193f634176e98a (patch) | |
tree | c26bdab0be782b6852e5f588dc5f1b056c2eec56 /config | |
parent | 61f0c58946ebac453b55a657cd4be1ac50a01e11 (diff) | |
download | gitlab-ce-759bab058520a21d87087355dc193f634176e98a.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config')
-rw-r--r-- | config/routes.rb | 2 | ||||
-rw-r--r-- | config/routes/git_http.rb | 2 | ||||
-rw-r--r-- | config/routes/project.rb | 62 |
3 files changed, 55 insertions, 11 deletions
diff --git a/config/routes.rb b/config/routes.rb index e32c4f7415b..23e97fe32dd 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -57,7 +57,7 @@ Rails.application.routes.draw do # Sign up get 'users/sign_up/welcome' => 'registrations#welcome' - patch 'users/sign_up/update_role' => 'registrations#update_role' + patch 'users/sign_up/update_registration' => 'registrations#update_registration' # Search get 'search' => 'search#show' diff --git a/config/routes/git_http.rb b/config/routes/git_http.rb index 2e70fd9f1b6..aac6d418a92 100644 --- a/config/routes/git_http.rb +++ b/config/routes/git_http.rb @@ -52,7 +52,7 @@ scope(path: '*namespace_id/:project_id', # /info/refs?service=git-receive-pack, but nothing else. # git_http_handshake = lambda do |request| - ::Constraints::ProjectUrlConstrainer.new.matches?(request) && + ::Constraints::ProjectUrlConstrainer.new.matches?(request, existence_check: false) && (request.query_string.blank? || request.query_string.match(/\Aservice=git-(upload|receive)-pack\z/)) end diff --git a/config/routes/project.rb b/config/routes/project.rb index 62a70b4655e..d49ba20ce84 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -245,6 +245,12 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do post :validate_query, on: :collection end end + + Gitlab.ee do + resources :alerts, constraints: { id: /\d+/ }, only: [:index, :create, :show, :update, :destroy] do + post :notify, on: :collection + end + end end resources :merge_requests, concerns: :awardable, except: [:new, :create, :show], constraints: { id: /\d+/ } do @@ -347,6 +353,17 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do end end + Gitlab.ee do + resources :path_locks, only: [:index, :destroy] do + collection do + post :toggle + end + end + + get '/service_desk' => 'service_desk#show', as: :service_desk + put '/service_desk' => 'service_desk#update', as: :service_desk_refresh + end + resource :variables, only: [:show, :update] resources :triggers, only: [:index, :create, :edit, :update, :destroy] @@ -380,6 +397,11 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do get :failures get :status get :test_report + + Gitlab.ee do + get :security + get :licenses + end end member do @@ -514,11 +536,24 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do get :realtime_changes post :create_merge_request get :discussions, format: :json + + Gitlab.ee do + get 'designs(/*vueroute)', to: 'issues#designs', as: :designs, format: false + end end collection do post :bulk_update post :import_csv + + Gitlab.ee do + post :export_csv + get :service_desk + end + end + + Gitlab.ee do + resources :issue_links, only: [:index, :create, :destroy], as: 'links', path: 'links' end end @@ -594,15 +629,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do Gitlab.ee do resources :managed_licenses, only: [:index, :show, :new, :create, :edit, :update, :destroy] end - - # Legacy routes. - # Introduced in 12.0. - # Should be removed after 12.1 - Gitlab::Routing.redirect_legacy_paths(self, :settings, :branches, :tags, - :network, :graphs, :autocomplete_sources, - :project_members, :deploy_keys, :deploy_tokens, - :labels, :milestones, :services, :boards, :releases, - :forks, :group_links, :import, :avatar) end resources(:projects, @@ -627,4 +653,22 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do end end end + + # Legacy routes. + # Introduced in 12.0. + # Should be removed after 12.1 + scope(path: '*namespace_id', + as: :namespace, + namespace_id: Gitlab::PathRegex.full_namespace_route_regex) do + scope(path: ':project_id', + constraints: { project_id: Gitlab::PathRegex.project_route_regex }, + module: :projects, + as: :project) do + Gitlab::Routing.redirect_legacy_paths(self, :settings, :branches, :tags, + :network, :graphs, :autocomplete_sources, + :project_members, :deploy_keys, :deploy_tokens, + :labels, :milestones, :services, :boards, :releases, + :forks, :group_links, :import, :avatar) + end + end end |