From 64e1d88285c95c93dcd646db986b7e17ffb0b157 Mon Sep 17 00:00:00 2001 From: huang Date: Sat, 15 Aug 2015 16:11:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E9=A1=B9=E7=9B=AE=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E6=8F=90=E7=A4=BA=20=E6=9C=AA=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E6=83=85=E5=86=B5=E4=B8=8B=E8=AE=BF=E9=97=AE=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E8=87=B3403?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 4 +++ app/views/layouts/_new_header.html.erb | 41 -------------------------- 2 files changed, 4 insertions(+), 41 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 13d23d0dc..bc155dbbe 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -98,6 +98,10 @@ class UsersController < ApplicationController # 用户消息 def user_messages + unless User.current.logged? + render_403 + return + end # 当前用户查看消息,则设置消息为已读 querys = @user.course_messages if User.current.id == @user.id diff --git a/app/views/layouts/_new_header.html.erb b/app/views/layouts/_new_header.html.erb index f6f09e075..9252e23b9 100644 --- a/app/views/layouts/_new_header.html.erb +++ b/app/views/layouts/_new_header.html.erb @@ -54,48 +54,7 @@ - -
  • - <%= link_to "#{l(:label_forge_message)}".html_safe %> - -
  • <% end -%> <%= header_render_menu :account_menu -%>