Skip to content

Commit

Permalink
Fixed issue zammad#602 - Admin user login via Oauth.
Browse files Browse the repository at this point in the history
  • Loading branch information
martini committed Jan 10, 2017
1 parent 8078d1b commit d36570a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ def user_device_check

def user_device_log(user, type)
switched_from_user_id = ENV['SWITCHED_FROM_USER_ID'] || session[:switched_from_user_id]
return true if params[:controller] == 'init' # do no device logging on static inital page
return true if switched_from_user_id
return true if !user
return true if !user.permissions?('user_preferences.device')
Expand Down

0 comments on commit d36570a

Please sign in to comment.