实训权限控制

This commit is contained in:
huang 2017-10-17 09:21:40 +08:00
parent 58f492d341
commit 7b5c9150bb
1 changed files with 4 additions and 4 deletions

View File

@ -220,10 +220,10 @@ module ApplicationHelper
# 判断用户是否认证
def check_authentication
# return true
# if params[:action] == "on_search" || params[:action] == "apply_trail" # 之所以这样处理是为了避开account页面ajax加载
# return true
# end
return true
if params[:action] == "on_search" || params[:action] == "apply_trail" # 之所以这样处理是为了避开account页面ajax加载
return true
end
authentication = User.where(:id => User.current.id, :certification => 1).first
user_identity = User.current.try(:user_extensions).try(:identity)
if user_identity.blank? || authentication.blank?