[bis] force login_with_france_connect at false when connection devise user
This commit is contained in:
parent
35ef473f59
commit
9c6b9d408b
4 changed files with 11 additions and 14 deletions
|
@ -6,10 +6,13 @@ class Users::SessionsController < Devise::SessionsController
|
|||
# super
|
||||
# end
|
||||
|
||||
# POST /resource/sign_in
|
||||
# def create
|
||||
# super
|
||||
# end
|
||||
#POST /resource/sign_in
|
||||
def create
|
||||
super
|
||||
|
||||
current_user.login_with_france_connect = false
|
||||
current_user.save
|
||||
end
|
||||
|
||||
# DELETE /resource/sign_out
|
||||
# def destroy
|
||||
|
|
|
@ -1,21 +1,17 @@
|
|||
Rails.application.routes.draw do
|
||||
|
||||
devise_for :users, controllers: {
|
||||
sessions: 'users/sessions'
|
||||
}
|
||||
sessions: 'users/sessions'
|
||||
}
|
||||
|
||||
devise_for :gestionnaires, controllers: {
|
||||
sessions: 'gestionnaires/sessions'
|
||||
}, skip: [:password, :registrations]
|
||||
|
||||
|
||||
root 'users/dossiers#index'
|
||||
# root 'users/france_connect_callbacks#login'
|
||||
|
||||
|
||||
get 'france_connect' => 'france_connect#login'
|
||||
get 'france_connect/callback' => 'france_connect#callback'
|
||||
|
||||
get 'france_connect' => 'france_connect#login'
|
||||
get 'france_connect/callback' => 'france_connect#callback'
|
||||
|
||||
namespace :users do
|
||||
get 'siret' => 'siret#index'
|
||||
|
|
|
@ -35,7 +35,6 @@ describe FranceConnectController, type: :controller do
|
|||
end
|
||||
|
||||
it 'redirect to dossiers list' do
|
||||
get :callback, code: code
|
||||
expect(response).to redirect_to(controller: 'users/dossiers', action: :index)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe FranceConnectService do
|
||||
|
||||
describe '.retrieve_user_informations' do
|
||||
|
||||
let(:code) { 'plop' }
|
||||
|
|
Loading…
Reference in a new issue