SessionController: do not display 'Connecté' when a login_link is required
This commit is contained in:
parent
87967568b7
commit
457bc13c75
1 changed files with 2 additions and 1 deletions
|
@ -28,6 +28,7 @@ class Users::SessionsController < Sessions::SessionsController
|
||||||
|
|
||||||
if gestionnaire_signed_in?
|
if gestionnaire_signed_in?
|
||||||
if trusted_device?
|
if trusted_device?
|
||||||
|
set_flash_message :notice, :signed_in
|
||||||
redirect_to gestionnaire_procedures_path
|
redirect_to gestionnaire_procedures_path
|
||||||
else
|
else
|
||||||
gestionnaire = current_gestionnaire
|
gestionnaire = current_gestionnaire
|
||||||
|
@ -39,6 +40,7 @@ class Users::SessionsController < Sessions::SessionsController
|
||||||
redirect_to link_sent_path(email: gestionnaire.email)
|
redirect_to link_sent_path(email: gestionnaire.email)
|
||||||
end
|
end
|
||||||
elsif user_signed_in?
|
elsif user_signed_in?
|
||||||
|
set_flash_message :notice, :signed_in
|
||||||
redirect_to after_sign_in_path_for(:user)
|
redirect_to after_sign_in_path_for(:user)
|
||||||
else
|
else
|
||||||
flash.alert = 'Mauvais couple login / mot de passe'
|
flash.alert = 'Mauvais couple login / mot de passe'
|
||||||
|
@ -127,7 +129,6 @@ class Users::SessionsController < Sessions::SessionsController
|
||||||
resource.remember_me = remember_me
|
resource.remember_me = remember_me
|
||||||
sign_in resource
|
sign_in resource
|
||||||
resource.force_sync_credentials
|
resource.force_sync_credentials
|
||||||
set_flash_message :notice, :signed_in
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue