mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 14:44:47 +02:00
Merge remote-tracking branch 'origin/master' into 1580-registrar-api-contacts-endpoint
This commit is contained in:
commit
a80d037677
37 changed files with 376 additions and 411 deletions
|
@ -91,9 +91,11 @@ Rails.application.routes.draw do
|
|||
resource :registry_lock, only: %i[create destroy]
|
||||
end
|
||||
resources :contacts, only: %i[index show update], param: :uuid
|
||||
resources :companies, only: %i[index]
|
||||
end
|
||||
|
||||
resources :auctions, only: %i[index show update], param: :uuid
|
||||
|
||||
end
|
||||
|
||||
match '*all', controller: 'cors', action: 'cors_preflight_check', via: [:options],
|
||||
|
@ -106,12 +108,6 @@ Rails.application.routes.draw do
|
|||
|
||||
devise_for :users, path: '', class_name: 'ApiUser', skip: %i[sessions]
|
||||
|
||||
devise_scope :registrar_user do
|
||||
match '/open_id/callback', via: %i[get post], to: 'tara#callback', as: :tara_callback
|
||||
match '/open_id/cancel', via: %i[get post delete], to: 'tara#cancel',
|
||||
as: :tara_cancel
|
||||
end
|
||||
|
||||
resources :invoices, except: %i[new create edit update destroy] do
|
||||
resource :delivery, controller: 'invoices/delivery', only: %i[new create]
|
||||
|
||||
|
@ -188,6 +184,22 @@ Rails.application.routes.draw do
|
|||
post 'sessions', to: 'registrar/sessions#create', as: :registrar_user_session
|
||||
|
||||
delete 'sign_out', to: 'registrar/sessions#destroy', as: :destroy_registrar_user_session
|
||||
|
||||
# TARA
|
||||
match '/open_id/callback', via: %i[get post], to: 'sso/tara#registrar_callback'
|
||||
match '/open_id/cancel', via: %i[get post delete], to: 'sso/tara#cancel'
|
||||
end
|
||||
end
|
||||
|
||||
scope :registrant do
|
||||
devise_scope :registrant_user do
|
||||
get 'sign_in', to: 'registrant/sessions#new', as: :new_registrant_user_session
|
||||
post 'sessions', to: 'registrant/sessions#create', as: :registrant_user_session
|
||||
delete 'sign_out', to: 'registrant/sessions#destroy', as: :destroy_registrant_user_session
|
||||
|
||||
# TARA
|
||||
match '/open_id/callback', via: %i[get post], to: 'sso/tara#registrant_callback'
|
||||
match '/open_id/cancel', via: %i[get post delete], to: 'sso/tara#cancel'
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -196,19 +208,9 @@ Rails.application.routes.draw do
|
|||
|
||||
# POST /registrant/sign_in is not used
|
||||
devise_for :users, path: '', class_name: 'RegistrantUser'
|
||||
devise_scope :registrant_user do
|
||||
get 'login/mid' => 'sessions#login_mid'
|
||||
post 'login/mid' => 'sessions#mid'
|
||||
post 'login/mid_status' => 'sessions#mid_status'
|
||||
post 'mid' => 'sessions#mid'
|
||||
|
||||
# /registrant/id path is hardcoded in Apache config for authentication with Estonian ID-card
|
||||
# Client certificate is asked only on login form submission, therefore the path must be different from the one in
|
||||
# `new_registrant_user_session_path` route, in case some other auth type will be implemented
|
||||
post 'id' => 'sessions#create', as: :id_card_sign_in
|
||||
end
|
||||
|
||||
resources :registrars, only: :show
|
||||
# resources :companies, only: :index
|
||||
resources :domains, only: %i[index show] do
|
||||
resources :contacts, only: %i[show edit update]
|
||||
member do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue