diff options
Diffstat (limited to 'config/routes')
-rw-r--r-- | config/routes/admin.rb | 1 | ||||
-rw-r--r-- | config/routes/jira_connect.rb | 6 | ||||
-rw-r--r-- | config/routes/members.rb | 7 | ||||
-rw-r--r-- | config/routes/project.rb | 5 | ||||
-rw-r--r-- | config/routes/user.rb | 38 |
5 files changed, 50 insertions, 7 deletions
diff --git a/config/routes/admin.rb b/config/routes/admin.rb index d7f73354d4c..e3b365ad276 100644 --- a/config/routes/admin.rb +++ b/config/routes/admin.rb @@ -93,6 +93,7 @@ namespace :admin do member do post :pause post :resume + post :retry end end diff --git a/config/routes/jira_connect.rb b/config/routes/jira_connect.rb index 1a21d7a8778..1e871d52c80 100644 --- a/config/routes/jira_connect.rb +++ b/config/routes/jira_connect.rb @@ -14,4 +14,10 @@ namespace :jira_connect do resources :subscriptions, only: [:index, :create, :destroy] resources :branches, only: [:new] + + resources :installations, only: [:index] do + collection do + put :update + end + end end diff --git a/config/routes/members.rb b/config/routes/members.rb new file mode 100644 index 00000000000..e84f0987171 --- /dev/null +++ b/config/routes/members.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +namespace :members do + namespace :mailgun do + resources :permanent_failures, only: [:create] + end +end diff --git a/config/routes/project.rb b/config/routes/project.rb index 8ba9c100f71..cbd2f5ac839 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -145,6 +145,8 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do resource :packages_and_registries, only: [:show] end + resources :usage_quotas, only: [:index] + resources :autocomplete_sources, only: [] do collection do get 'members' @@ -352,6 +354,8 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do get 'details', on: :member end + resources :work_items, only: [:index] + resource :tracing, only: [:show] post 'incidents/integrations/pagerduty', to: 'incident_management/pager_duty_incidents#create' @@ -599,7 +603,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do :vulnerability_feedback, :security, :dependencies, :issues, :pipelines, :pipeline_schedules, :runners, :snippets) end - # rubocop: disable Cop/PutProjectRoutesUnderScope resources(:projects, path: '/', diff --git a/config/routes/user.rb b/config/routes/user.rb index 109179f76f1..01de59c3357 100644 --- a/config/routes/user.rb +++ b/config/routes/user.rb @@ -21,11 +21,35 @@ if Gitlab::Auth::Ldap::Config.sign_in_enabled? end end -devise_for :users, controllers: { omniauth_callbacks: :omniauth_callbacks, - registrations: :registrations, - passwords: :passwords, - sessions: :sessions, - confirmations: :confirmations } +devise_controllers = { omniauth_callbacks: :omniauth_callbacks, + registrations: :registrations, + passwords: :passwords, + sessions: :sessions, + confirmations: :confirmations } + +if ::Gitlab.ee? && ::Gitlab::Geo.connected? && ::Gitlab::Geo.secondary? + devise_for :users, controllers: devise_controllers, path_names: { sign_in: 'auth/geo/sign_in', + sign_out: 'auth/geo/sign_out' } + # When using Geo, the other type of routes should be present as well, as browsers + # cache 302 redirects locally, and events like primary going offline or a failover + # can result in browsers requesting the other paths because of it. + as :user do + get '/users/sign_in', to: 'sessions#new' + post '/users/sign_in', to: 'sessions#create' + post '/users/sign_out', to: 'sessions#destroy' + end +else + devise_for :users, controllers: devise_controllers + + # We avoid drawing Geo routes for FOSS, but keep them in for EE + Gitlab.ee do + as :user do + get '/users/auth/geo/sign_in', to: 'sessions#new' + post '/users/auth/geo/sign_in', to: 'sessions#create' + post '/users/auth/geo/sign_out', to: 'sessions#destroy' + end + end +end devise_scope :user do get '/users/almost_there' => 'confirmations#almost_there' @@ -36,6 +60,8 @@ scope '-/users', module: :users do post :accept, on: :member post :decline, on: :member end + + resources :group_callouts, only: [:create] end scope(constraints: { username: Gitlab::PathRegex.root_namespace_route_regex }) do @@ -64,7 +90,7 @@ constraints(::Constraints::UserUrlConstrainer.new) do get ':username.keys' => 'users#ssh_keys', constraints: { username: Gitlab::PathRegex.root_namespace_route_regex } # Get all GPG keys of user - get ':username.gpg' => 'users#gpg_keys', constraints: { username: Gitlab::PathRegex.root_namespace_route_regex } + get ':username.gpg' => 'users#gpg_keys', as: 'user_gpg_keys', constraints: { username: Gitlab::PathRegex.root_namespace_route_regex } scope(path: ':username', as: :user, |