Merge pull request #1869 from tchak/fix-flipflop

Flipflop should check administrateur id not user id
This commit is contained in:
Frederic Merizen 2018-04-25 11:13:45 +02:00 committed by GitHub
commit 2a0b92ad3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,8 +35,8 @@ module Flipflop::Strategies
end end
def find_current_administrateur def find_current_administrateur
if request.session["warden.user.user.key"] if request.session["warden.user.administrateur.key"]
administrateur_id = request.session["warden.user.user.key"][0][0] administrateur_id = request.session["warden.user.administrateur.key"][0][0]
Administrateur.find_by(id: administrateur_id) Administrateur.find_by(id: administrateur_id)
end end
end end