diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-07 21:06:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-07 21:06:21 +0300 |
commit | d8ccc7a00b7a1ea954263170a2044257424a2cfe (patch) | |
tree | 0a29cb558aae61795da47c82ce7e87983c5dc4af /config | |
parent | 90a06a20be61bb6d48d77746091492831153e075 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config')
-rw-r--r-- | config/routes/git_http.rb | 2 | ||||
-rw-r--r-- | config/routes/project.rb | 62 |
2 files changed, 10 insertions, 54 deletions
diff --git a/config/routes/git_http.rb b/config/routes/git_http.rb index aac6d418a92..2e70fd9f1b6 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, existence_check: false) && + ::Constraints::ProjectUrlConstrainer.new.matches?(request) && (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 d49ba20ce84..62a70b4655e 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -245,12 +245,6 @@ 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 @@ -353,17 +347,6 @@ 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] @@ -397,11 +380,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do get :failures get :status get :test_report - - Gitlab.ee do - get :security - get :licenses - end end member do @@ -536,24 +514,11 @@ 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 @@ -629,6 +594,15 @@ 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, @@ -653,22 +627,4 @@ 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 |