From f416e58ac0224b66e6cea8ee06c848e7fa288711 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Wed, 19 Aug 2015 02:13:38 +0200 Subject: [PATCH] Do not device logging in user switch mode. --- app/controllers/application_controller.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 68c72fb88..a15c01162 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -129,6 +129,9 @@ class ApplicationController < ActionController::Base def user_device_log(user, type) + # return if we are in switch to user mode + return if session[:switched_from_user_id] + # for sessions we need the fingperprint if !params[:fingerprint] && type == 'session' render json: { error: 'Need fingerprint param!' }, status: :unprocessable_entity