Merge branch 'develop' into dev_aliyun

chromesetting
daiao 5 years ago
commit dc516e4a2e

@ -127,7 +127,7 @@ class AccountsController < ApplicationController
end end
end end
def successful_authentication(user) def successful_authentication(user)
uid_logger("Successful authentication start: '#{user.login}' from #{request.remote_ip} at #{Time.now.utc}") uid_logger("Successful authentication start: '#{user.login}' from #{request.remote_ip} at #{Time.now.utc}")
# Valid user # Valid user
self.logged_user = user self.logged_user = user

@ -6,6 +6,7 @@ module LaboratoryHelper
helper_method :current_laboratory helper_method :current_laboratory
helper_method :default_setting helper_method :default_setting
helper_method :default_yun_session
end end
def current_laboratory def current_laboratory
@ -23,4 +24,8 @@ module LaboratoryHelper
def setup_laboratory def setup_laboratory
Laboratory.current = current_laboratory Laboratory.current = current_laboratory
end end
def default_yun_session
@_default_yun_session = "#{request.subdomain.split('.').first}_user_id"
end
end end

@ -74,6 +74,7 @@ module LoginHelper
# # end # # end
session[:user_id] = user.id session[:user_id] = user.id
# session[:"#{default_yun_session}"] = user.id
session[:ctime] = Time.now.utc.to_i session[:ctime] = Time.now.utc.to_i
session[:atime] = Time.now.utc.to_i session[:atime] = Time.now.utc.to_i
end end

Loading…
Cancel
Save