Browse Source

修改require_login

tags/v1
sylor_huang@126.com 6 years ago
parent
commit
30f2a47069
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      app/controllers/application_controller.rb

+ 3
- 0
app/controllers/application_controller.rb View File

@@ -233,6 +233,9 @@ class ApplicationController < ActionController::Base
# 未授权的捕捉407,弹试用申请弹框
def require_login
#6.13 -hs
Rails.logger.info("########____________________########{User.current.login}")
Rails.logger.info("########____________________########{User.current.logged?}")

tip_exception(401, "请登录后再操作") unless User.current.logged?
end



Loading…
Cancel
Save