add log for login

dev_tpm_ui
jingquan huang 5 years ago
parent b6e81333e2
commit 42404e8b13

@ -259,6 +259,7 @@ class ApplicationController < ActionController::Base
# reacct静态资源加载不需要走这一步 # reacct静态资源加载不需要走这一步
return if params[:controller] == "main" return if params[:controller] == "main"
# Find the current user # Find the current user
Rails.logger.info("current_laboratory is #{current_laboratory} domain is #{request.subdomain}")
User.current = find_current_user User.current = find_current_user
uid_logger("user_setup: " + (User.current.logged? ? "#{User.current.try(:login)} (id=#{User.current.try(:id)})" : "anonymous")) uid_logger("user_setup: " + (User.current.logged? ? "#{User.current.try(:login)} (id=#{User.current.try(:id)})" : "anonymous"))

@ -11,7 +11,6 @@ module LaboratoryHelper
def current_laboratory def current_laboratory
@_current_laboratory ||= (Laboratory.find_by_subdomain(request.subdomain) || Laboratory.find(1)) @_current_laboratory ||= (Laboratory.find_by_subdomain(request.subdomain) || Laboratory.find(1))
# Rails.logger.info("current_laboratory is ######{@_current_laboratory.try(:identifier)}")
end end
def default_laboratory def default_laboratory

Loading…
Cancel
Save