From 73afb7e6c8e2834b2523cbf27d8db0b73df4bd3e Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Mon, 22 Dec 2014 14:15:49 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E7=94=A8=E4=BD=9C=E4=B8=9A=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E6=97=B6=E9=A6=96=E5=85=88=E5=88=A4=E6=96=AD=E8=AF=A5?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E7=9A=84=E6=89=80=E5=B1=9E=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=AD=98=E5=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 2 +- db/schema.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 410818fdb..8183ed7ad 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -436,7 +436,7 @@ class UsersController < ApplicationController activity = activity.reject { |e| ((e.act_type=="Issue") && ( !e.act.visible?(User.current))) || ((e.act_type == "Journal") && (!e.act.project.visible?(User.current))) || - ((e.act_type == "Bid") && (e.act.homework_for_courses.count > 0 && + ((e.act_type == "Bid") && (e.act.courses.first && (!e.act.homework_for_courses.first.course.visible?(User.current) || !User.current.member_of_course?(e.act.homework_for_courses.first.course) || !User.current.admin?))) } diff --git a/db/schema.rb b/db/schema.rb index f12d6ad0a..a75c6eb29 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20141201085218) do +ActiveRecord::Schema.define(:version => 20141210070327) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false