403 problem

dev_course
jingquan huang 6 years ago
parent 287f7ff17b
commit ba91ae106f

@ -215,7 +215,7 @@ class ApplicationController < ActionController::Base
return if params[:controller] == "main"
# Find the current user
User.current = find_current_user
uid_logger("user_step: " + (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"))
if !User.current.logged? && Rails.env.development?
User.current = User.find 12

@ -118,7 +118,6 @@ class ShixunsController < ApplicationController
#@fans_count = owner.followers.count
#@followed_count = owner.followed_users.count
@user_own_shixuns = owner.shixuns.published.count
uid_logger_error("777777777777777777")
end
# 排行榜

@ -14,8 +14,8 @@ class UsersController < ApplicationController
# 贴吧获取用户信接口
def get_user_info
begin
@user = current_user
uid_logger_error("############{@user.id}")
@user = User.find(12)
# @user = current_user
# TODO 等消息上线再打开注释
#@tidding_count = unviewed_tiddings(current_user) if current_user.present?
@course =
@ -55,7 +55,8 @@ class UsersController < ApplicationController
# Redo: 消息总数缓存
def get_navigation_info
@old_domain = edu_setting('old_edu_host')
@user = current_user
# @user = current_user
@user = User.find(12)
# 新消息数
@new_message = @user.tidings.where("created_at > '#{@user.click_time}'").count > 0 || @user.private_messages.where("created_at > '#{@user.click_time}'").count > 0

Loading…
Cancel
Save