Move sign_in behind /manager (not in namespace due to Administrate resources autoloading)
This commit is contained in:
parent
d5c036362b
commit
d9feb4be06
3 changed files with 4 additions and 5 deletions
|
@ -3,7 +3,7 @@ class Administrations::OmniauthCallbacksController < Devise::OmniauthCallbacksCo
|
|||
administration = Administration.from_omniauth(request.env["omniauth.auth"])
|
||||
if administration.present?
|
||||
sign_in administration
|
||||
redirect_to administrations_path
|
||||
redirect_to manager_administrateurs_path
|
||||
else
|
||||
flash[:alert] = "Compte GitHub non autorisé"
|
||||
redirect_to root_path
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
%ul.sidebar__list
|
||||
%li
|
||||
= link_to "Se déconnecter", administrations_sign_out_path, method: :delete, class: "sidebar__link"
|
||||
= link_to "Se déconnecter", manager_sign_out_path, method: :delete, class: "sidebar__link"
|
||||
|
||||
%hr{ style: "margin-bottom: 0;" }
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
Rails.application.routes.draw do
|
||||
get 'manager/sign_in' => 'administrations/sessions#new'
|
||||
delete 'manager/sign_out' => 'administrations/sessions#destroy'
|
||||
namespace :manager do
|
||||
resources :procedures, only: [:index, :show] do
|
||||
post 'whitelist', on: :member
|
||||
|
@ -56,9 +58,6 @@ Rails.application.routes.draw do
|
|||
get 'users' => 'users#index'
|
||||
get 'admin' => 'admin#index'
|
||||
|
||||
get 'administrations/sign_in' => 'administrations/sessions#new'
|
||||
delete 'administrations/sign_out' => 'administrations/sessions#destroy'
|
||||
|
||||
resources :stats, only: [:index]
|
||||
|
||||
namespace :france_connect do
|
||||
|
|
Loading…
Reference in a new issue