修改资料页面权限问题

dev_forum
jingquan huang 5 years ago
parent 16f7defd34
commit 0e4bc4d4ce

@ -1,15 +1,8 @@
class Users::BaseAccountController < Users::BaseController
before_action :require_login, :check_auth
before_action :require_login
def observed_user
@_observed_user ||= (User.find_by_id(params[:account_id]) || User.find_by_login(params[:account_id]))
end
private
def require_login
return if User.current.logged?
tip_exception(401, "..")
end
end

Loading…
Cancel
Save