projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '17829-remove-omniauth' refs #17829
[arvados.git]
/
services
/
api
/
config
/
routes.rb
diff --git
a/services/api/config/routes.rb
b/services/api/config/routes.rb
index 27fd67cece046268f449a8cc18ad35b30d128b44..69758580356ba771ac05a70e022735fe092962d5 100644
(file)
--- a/
services/api/config/routes.rb
+++ b/
services/api/config/routes.rb
@@
-1,33
+1,49
@@
-Server::Application.routes.draw do
- themes_for_rails
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
- # See http://guides.rubyonrails.org/routing.html
+Rails.application.routes.draw do
+ themes_for_rails
# OPTIONS requests are not allowed at routes that use cookies.
['/auth/*a', '/login', '/logout'].each do |nono|
# OPTIONS requests are not allowed at routes that use cookies.
['/auth/*a', '/login', '/logout'].each do |nono|
- match nono,
:to => 'user_sessions#cross_origin_forbidden', :via =>
'OPTIONS'
+ match nono,
to: 'user_sessions#cross_origin_forbidden', via:
'OPTIONS'
end
# OPTIONS at discovery and API paths get an empty response with CORS headers.
end
# OPTIONS at discovery and API paths get an empty response with CORS headers.
- match '/discovery/v1/*a',
:to => 'static#empty', :via =>
'OPTIONS'
- match '/arvados/v1/*a',
:to => 'static#empty', :via =>
'OPTIONS'
+ match '/discovery/v1/*a',
to: 'static#empty', via:
'OPTIONS'
+ match '/arvados/v1/*a',
to: 'static#empty', via:
'OPTIONS'
namespace :arvados do
namespace :v1 do
resources :api_client_authorizations do
post 'create_system_auth', on: :collection
namespace :arvados do
namespace :v1 do
resources :api_client_authorizations do
post 'create_system_auth', on: :collection
+ get 'current', on: :collection
end
resources :api_clients
resources :authorized_keys
resources :collections do
get 'provenance', on: :member
get 'used_by', on: :member
end
resources :api_clients
resources :authorized_keys
resources :collections do
get 'provenance', on: :member
get 'used_by', on: :member
+ post 'trash', on: :member
+ post 'untrash', on: :member
end
resources :groups do
get 'contents', on: :collection
get 'contents', on: :member
end
resources :groups do
get 'contents', on: :collection
get 'contents', on: :member
+ get 'shared', on: :collection
+ post 'trash', on: :member
+ post 'untrash', on: :member
end
resources :humans
resources :job_tasks
end
resources :humans
resources :job_tasks
+ resources :containers do
+ get 'auth', on: :member
+ post 'lock', on: :member
+ post 'unlock', on: :member
+ get 'secret_mounts', on: :member
+ get 'current', on: :collection
+ end
+ resources :container_requests
resources :jobs do
get 'queue', on: :collection
get 'queue_size', on: :collection
resources :jobs do
get 'queue', on: :collection
get 'queue_size', on: :collection
@@
-45,8
+61,11
@@
Server::Application.routes.draw do
resources :nodes do
post 'ping', on: :member
end
resources :nodes do
post 'ping', on: :member
end
- resources :pipeline_instances
+ resources :pipeline_instances do
+ post 'cancel', on: :member
+ end
resources :pipeline_templates
resources :pipeline_templates
+ resources :workflows
resources :repositories do
get 'get_all_permissions', on: :collection
end
resources :repositories do
get 'get_all_permissions', on: :collection
end
@@
-62,12
+81,15
@@
Server::Application.routes.draw do
post 'activate', on: :member
post 'setup', on: :collection
post 'unsetup', on: :member
post 'activate', on: :member
post 'setup', on: :collection
post 'unsetup', on: :member
+ post 'update_uuid', on: :member
+ post 'merge', on: :collection
+ patch 'batch_update', on: :collection
end
resources :virtual_machines do
get 'logins', on: :member
get 'get_all_logins', on: :collection
end
end
resources :virtual_machines do
get 'logins', on: :member
get 'get_all_logins', on: :collection
end
- get '/permissions/:uuid',
:to =>
'links#get_permissions'
+ get '/permissions/:uuid',
to:
'links#get_permissions'
end
end
end
end
@@
-76,22
+98,24
@@
Server::Application.routes.draw do
end
# omniauth
end
# omniauth
- match '/auth/:provider/callback',
:to => 'user_sessions#create'
- match '/auth/failure',
:to => 'user_sessions#failure'
+ match '/auth/:provider/callback',
to: 'user_sessions#create', via: [:get, :post]
+ match '/auth/failure',
to: 'user_sessions#failure', via: [:get, :post]
# not handled by omniauth provider -> 403 with no CORS headers.
# not handled by omniauth provider -> 403 with no CORS headers.
- get '/auth/*a',
:to =>
'user_sessions#cross_origin_forbidden'
+ get '/auth/*a',
to:
'user_sessions#cross_origin_forbidden'
# Custom logout
# Custom logout
- match '/login', :to => 'user_sessions#login'
- match '/logout', :to => 'user_sessions#logout'
+ match '/login', to: 'user_sessions#login', via: [:get, :post]
+ match '/logout', to: 'user_sessions#logout', via: [:get, :post]
+
+ match '/discovery/v1/apis/arvados/v1/rest', to: 'arvados/v1/schema#index', via: [:get, :post]
- match '/
discovery/v1/apis/arvados/v1/rest', :to => 'arvados/v1/schema#index'
+ match '/
static/login_failure', to: 'static#login_failure', as: :login_failure, via: [:get, :post]
- match '/
static/login_failure', :to => 'static#login_failure', :as => :login_failure
+ match '/
_health/ping', to: 'arvados/v1/healthcheck#ping', via: [:get]
# Send unroutable requests to an arbitrary controller
# (ends up at ApplicationController#render_not_found)
# Send unroutable requests to an arbitrary controller
# (ends up at ApplicationController#render_not_found)
- match '*a',
:to => 'static#render_not_found'
+ match '*a',
to: 'static#render_not_found', via: [:get, :post, :put, :patch, :delete, :options]
- root
:to =>
'static#home'
+ root
to:
'static#home'
end
end