Flipflop should check administrateur id not user id

This commit is contained in:
Paul Chavard 2018-04-25 11:06:40 +02:00
parent fe0aafdd44
commit e76e17895a

View file

@ -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