Do not device logging in user switch mode.
This commit is contained in:
parent
9985390c93
commit
f416e58ac0
1 changed files with 3 additions and 0 deletions
|
@ -129,6 +129,9 @@ class ApplicationController < ActionController::Base
|
||||||
|
|
||||||
def user_device_log(user, type)
|
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
|
# for sessions we need the fingperprint
|
||||||
if !params[:fingerprint] && type == 'session'
|
if !params[:fingerprint] && type == 'session'
|
||||||
render json: { error: 'Need fingerprint param!' }, status: :unprocessable_entity
|
render json: { error: 'Need fingerprint param!' }, status: :unprocessable_entity
|
||||||
|
|
Loading…
Reference in a new issue