add logout route
This commit is contained in:
parent
e73318e3bb
commit
063445b892
4 changed files with 8 additions and 0 deletions
|
@ -95,4 +95,9 @@ class Users::SessionsController < Devise::SessionsController
|
||||||
redirect_to link_sent_path(email: instructeur.email)
|
redirect_to link_sent_path(email: instructeur.email)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# agent connect callback
|
||||||
|
def logout
|
||||||
|
redirect_to root_path, notice: I18n.t('devise.sessions.signed_out')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -5,3 +5,4 @@ en:
|
||||||
request_new_password: Request new password
|
request_new_password: Request new password
|
||||||
sessions:
|
sessions:
|
||||||
signed_in_multiple_profile: "You are connected ! You can switch between your multiple profiles : %{roles}."
|
signed_in_multiple_profile: "You are connected ! You can switch between your multiple profiles : %{roles}."
|
||||||
|
signed_out: You are now disconnected.
|
||||||
|
|
|
@ -5,3 +5,4 @@ fr:
|
||||||
request_new_password: Demander un nouveau mot de passe
|
request_new_password: Demander un nouveau mot de passe
|
||||||
sessions:
|
sessions:
|
||||||
signed_in_multiple_profile: "Vous êtes connecté(e) ! Vous pouvez à tout moment alterner entre vos différents profils : %{roles}."
|
signed_in_multiple_profile: "Vous êtes connecté(e) ! Vous pouvez à tout moment alterner entre vos différents profils : %{roles}."
|
||||||
|
signed_out: Vous êtes maintenant déconnecté(e).
|
||||||
|
|
|
@ -155,6 +155,7 @@ Rails.application.routes.draw do
|
||||||
get 'lien-envoye' => 'users/sessions#link_sent', as: 'link_sent'
|
get 'lien-envoye' => 'users/sessions#link_sent', as: 'link_sent'
|
||||||
post '/instructeurs/reset-link-sent' => 'users/sessions#reset_link_sent'
|
post '/instructeurs/reset-link-sent' => 'users/sessions#reset_link_sent'
|
||||||
get '/users/password/reset-link-sent' => 'users/passwords#reset_link_sent'
|
get '/users/password/reset-link-sent' => 'users/passwords#reset_link_sent'
|
||||||
|
get 'logout' => 'users/sessions#logout'
|
||||||
end
|
end
|
||||||
|
|
||||||
get 'password_complexity' => 'password_complexity#show', as: 'show_password_complexity'
|
get 'password_complexity' => 'password_complexity#show', as: 'show_password_complexity'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue