2021-02-03 21:09:17 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-01-22 17:38:08 +00:00
|
|
|
# Alias import callbacks under the /users/auth endpoint so that
|
|
|
|
# the OAuth2 callback URL can be restricted under http://example.com/users/auth
|
|
|
|
# instead of http://example.com.
|
2019-02-01 21:18:41 +00:00
|
|
|
Devise.omniauth_providers.map(&:downcase).each do |provider|
|
2019-01-22 17:38:08 +00:00
|
|
|
next if provider == 'ldapmain'
|
|
|
|
|
|
|
|
get "/users/auth/-/import/#{provider}/callback", to: "import/#{provider}#callback", as: "users_import_#{provider}_callback"
|
|
|
|
end
|
|
|
|
|
2016-10-05 12:21:27 +00:00
|
|
|
namespace :import do
|
2020-08-07 21:10:07 +00:00
|
|
|
resources :available_namespaces, only: [:index], controller: :available_namespaces
|
|
|
|
|
2021-09-30 15:12:24 +00:00
|
|
|
namespace :url do
|
|
|
|
post :validate
|
|
|
|
end
|
|
|
|
|
2016-10-05 12:21:27 +00:00
|
|
|
resource :github, only: [:create, :new], controller: :github do
|
|
|
|
post :personal_access_token
|
|
|
|
get :status
|
|
|
|
get :callback
|
2018-11-07 16:44:21 +00:00
|
|
|
get :realtime_changes
|
2016-10-05 12:21:27 +00:00
|
|
|
end
|
|
|
|
|
2016-12-15 16:31:14 +00:00
|
|
|
resource :gitea, only: [:create, :new], controller: :gitea do
|
2016-10-17 15:58:57 +00:00
|
|
|
post :personal_access_token
|
|
|
|
get :status
|
2018-11-07 16:44:21 +00:00
|
|
|
get :realtime_changes
|
2016-10-17 15:58:57 +00:00
|
|
|
end
|
|
|
|
|
2016-10-05 12:21:27 +00:00
|
|
|
resource :gitlab, only: [:create], controller: :gitlab do
|
|
|
|
get :status
|
|
|
|
get :callback
|
2020-06-15 15:08:20 +00:00
|
|
|
get :realtime_changes
|
2016-10-05 12:21:27 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
resource :bitbucket, only: [:create], controller: :bitbucket do
|
|
|
|
get :status
|
|
|
|
get :callback
|
2020-06-15 15:08:20 +00:00
|
|
|
get :realtime_changes
|
2016-10-05 12:21:27 +00:00
|
|
|
end
|
|
|
|
|
2018-06-25 20:06:10 +00:00
|
|
|
resource :bitbucket_server, only: [:create, :new], controller: :bitbucket_server do
|
|
|
|
post :configure
|
|
|
|
get :status
|
|
|
|
get :callback
|
2020-06-15 15:08:20 +00:00
|
|
|
get :realtime_changes
|
2018-06-25 20:06:10 +00:00
|
|
|
end
|
|
|
|
|
2016-10-05 12:21:27 +00:00
|
|
|
resource :fogbugz, only: [:create, :new], controller: :fogbugz do
|
|
|
|
get :status
|
|
|
|
post :callback
|
2020-06-15 15:08:20 +00:00
|
|
|
get :realtime_changes
|
2016-10-05 12:21:27 +00:00
|
|
|
|
|
|
|
get :new_user_map, path: :user_map
|
|
|
|
post :create_user_map, path: :user_map
|
|
|
|
end
|
|
|
|
|
|
|
|
resource :gitlab_project, only: [:create, :new] do
|
|
|
|
post :create
|
2020-03-10 18:08:17 +00:00
|
|
|
post :authorize
|
2016-10-05 12:21:27 +00:00
|
|
|
end
|
2018-07-02 09:16:24 +00:00
|
|
|
|
2020-05-21 09:08:04 +00:00
|
|
|
resource :gitlab_group, only: [:create] do
|
|
|
|
post :authorize
|
|
|
|
end
|
|
|
|
|
2020-10-23 15:08:42 +00:00
|
|
|
resource :bulk_imports, only: [:create] do
|
2020-09-29 18:09:52 +00:00
|
|
|
post :configure
|
|
|
|
get :status
|
2021-01-11 18:10:43 +00:00
|
|
|
get :realtime_changes
|
2021-10-04 15:12:14 +00:00
|
|
|
get :history
|
2020-09-29 18:09:52 +00:00
|
|
|
end
|
|
|
|
|
2018-07-02 09:16:24 +00:00
|
|
|
resource :manifest, only: [:create, :new], controller: :manifest do
|
|
|
|
get :status
|
2020-08-19 00:10:34 +00:00
|
|
|
get :realtime_changes
|
2018-07-02 09:16:24 +00:00
|
|
|
post :upload
|
|
|
|
end
|
2019-04-23 14:27:01 +00:00
|
|
|
|
|
|
|
resource :phabricator, only: [:create, :new], controller: :phabricator
|
2016-10-05 12:21:27 +00:00
|
|
|
end
|