Fix features flip on user connection for unified_login
This commit is contained in:
parent
a7166d306f
commit
32d70bd909
2 changed files with 6 additions and 4 deletions
|
@ -23,16 +23,16 @@ class Users::SessionsController < Sessions::SessionsController
|
||||||
#POST /resource/sign_in
|
#POST /resource/sign_in
|
||||||
def create
|
def create
|
||||||
try_to_authenticate(User)
|
try_to_authenticate(User)
|
||||||
try_to_authenticate(Gestionnaire)
|
try_to_authenticate(Gestionnaire) if Features.unified_login
|
||||||
|
|
||||||
if user_signed_in?
|
if user_signed_in?
|
||||||
current_user.update_attributes(loged_in_with_france_connect: '')
|
current_user.update_attributes(loged_in_with_france_connect: '')
|
||||||
end
|
end
|
||||||
|
|
||||||
if gestionnaire_signed_in?
|
if user_signed_in?
|
||||||
redirect_to backoffice_path
|
|
||||||
elsif user_signed_in?
|
|
||||||
redirect_to after_sign_in_path_for(:user)
|
redirect_to after_sign_in_path_for(:user)
|
||||||
|
elsif gestionnaire_signed_in?
|
||||||
|
redirect_to backoffice_path
|
||||||
else
|
else
|
||||||
new
|
new
|
||||||
render :new, status: 401
|
render :new, status: 401
|
||||||
|
|
|
@ -1 +1,3 @@
|
||||||
remote_storage: true
|
remote_storage: true
|
||||||
|
unified_login: false
|
||||||
|
opensimplif: false
|
Loading…
Reference in a new issue