[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
|
# super
|
||||||
# end
|
# end
|
||||||
|
|
||||||
# POST /resource/sign_in
|
#POST /resource/sign_in
|
||||||
# def create
|
def create
|
||||||
# super
|
super
|
||||||
# end
|
|
||||||
|
current_user.login_with_france_connect = false
|
||||||
|
current_user.save
|
||||||
|
end
|
||||||
|
|
||||||
# DELETE /resource/sign_out
|
# DELETE /resource/sign_out
|
||||||
# def destroy
|
# def destroy
|
||||||
|
|
|
@ -1,21 +1,17 @@
|
||||||
Rails.application.routes.draw do
|
Rails.application.routes.draw do
|
||||||
|
|
||||||
devise_for :users, controllers: {
|
devise_for :users, controllers: {
|
||||||
sessions: 'users/sessions'
|
sessions: 'users/sessions'
|
||||||
}
|
}
|
||||||
|
|
||||||
devise_for :gestionnaires, controllers: {
|
devise_for :gestionnaires, controllers: {
|
||||||
sessions: 'gestionnaires/sessions'
|
sessions: 'gestionnaires/sessions'
|
||||||
}, skip: [:password, :registrations]
|
}, skip: [:password, :registrations]
|
||||||
|
|
||||||
|
|
||||||
root 'users/dossiers#index'
|
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
|
namespace :users do
|
||||||
get 'siret' => 'siret#index'
|
get 'siret' => 'siret#index'
|
||||||
|
|
|
@ -35,7 +35,6 @@ describe FranceConnectController, type: :controller do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'redirect to dossiers list' do
|
it 'redirect to dossiers list' do
|
||||||
get :callback, code: code
|
|
||||||
expect(response).to redirect_to(controller: 'users/dossiers', action: :index)
|
expect(response).to redirect_to(controller: 'users/dossiers', action: :index)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe FranceConnectService do
|
describe FranceConnectService do
|
||||||
|
|
||||||
describe '.retrieve_user_informations' do
|
describe '.retrieve_user_informations' do
|
||||||
|
|
||||||
let(:code) { 'plop' }
|
let(:code) { 'plop' }
|
||||||
|
|
Loading…
Reference in a new issue