|
|
@ -176,19 +176,20 @@ class ApplicationController < ActionController::Base
|
|
|
|
# 系统全局认证
|
|
|
|
# 系统全局认证
|
|
|
|
#
|
|
|
|
#
|
|
|
|
def check_auth
|
|
|
|
def check_auth
|
|
|
|
old_edu_host = edu_setting('old_edu_host')
|
|
|
|
# old_edu_host = edu_setting('old_edu_host')
|
|
|
|
ue = current_user.user_extension
|
|
|
|
# ue = current_user.user_extension
|
|
|
|
|
|
|
|
#
|
|
|
|
if current_user.lastname.blank? || ue.school_id.blank? || ue.identity.blank? || current_user.mail.blank?
|
|
|
|
# if current_user.lastname.blank? || ue.school_id.blank? || ue.identity.blank? || current_user.mail.blank?
|
|
|
|
info_url = old_edu_host + '/account/user_info'
|
|
|
|
# info_url = old_edu_host + '/account/user_info'
|
|
|
|
render :json => { status: 402, url: info_url }
|
|
|
|
# render :json => { status: 402, url: info_url }
|
|
|
|
elsif current_user.certification != 1
|
|
|
|
# elsif current_user.certification != 1
|
|
|
|
day_cer = UserDayCertification.where(user_id: current_user.id).last
|
|
|
|
# day_cer = UserDayCertification.where(user_id: current_user.id).last
|
|
|
|
unless (Time.now.to_i - day_cer.try(:created_at).to_i) < 86400
|
|
|
|
# unless (Time.now.to_i - day_cer.try(:created_at).to_i) < 86400
|
|
|
|
account_url = old_edu_host + "/my/account"
|
|
|
|
# account_url = old_edu_host + "/my/account"
|
|
|
|
render :json => { status: 402, url: account_url }
|
|
|
|
# render :json => { status: 402, url: account_url }
|
|
|
|
end
|
|
|
|
# end
|
|
|
|
end
|
|
|
|
# end
|
|
|
|
|
|
|
|
true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
# 身份资料的认证:
|
|
|
|
# 身份资料的认证:
|
|
|
|