From e76e17895a28e4f932db8a8908d84a61b8ce28d1 Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Wed, 25 Apr 2018 11:06:40 +0200 Subject: [PATCH] Flipflop should check administrateur id not user id --- app/lib/flipflop/strategies/user_preference_strategy.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/lib/flipflop/strategies/user_preference_strategy.rb b/app/lib/flipflop/strategies/user_preference_strategy.rb index 3766e6a93..c4b0824d2 100644 --- a/app/lib/flipflop/strategies/user_preference_strategy.rb +++ b/app/lib/flipflop/strategies/user_preference_strategy.rb @@ -35,8 +35,8 @@ module Flipflop::Strategies end def find_current_administrateur - if request.session["warden.user.user.key"] - administrateur_id = request.session["warden.user.user.key"][0][0] + if request.session["warden.user.administrateur.key"] + administrateur_id = request.session["warden.user.administrateur.key"][0][0] Administrateur.find_by(id: administrateur_id) end end